home *** CD-ROM | disk | FTP | other *** search
/ SPACE 2 / SPACE - Library 2 - Volume 1.iso / demos / 19 / tvx_ref.doc < prev    next >
Encoding:
Text File  |  1987-07-19  |  100.6 KB  |  2,708 lines

  1.  
  2.  
  3.                                                                  
  4.  
  5.  
  6.                          TVX Reference Manual
  7.  
  8.  
  9.  
  10.      This is the Reference Manual for TVX, a full screen editor
  11. written in C by Dr. Bruce E. Wampler.  (Current address: Dr. Bruce E.
  12. Wampler, University of New Mexico, Department of Computer Science,
  13. Farris Engineering Center, Albuquerque, NM 87131; uucp: ...{ucbvax |
  14. gatech | ihnp4!lanl}!unmvax!wampler).  Any comments, bug reports, or
  15. suggestions should be sent to that address.  The name TVX is derived
  16. from "TV" editor for any terminal ("X"). 
  17.  
  18.      This version of TVX Copyright (c) 1986, 1987 by Bruce E. Wampler
  19. Permission is hereby granted for free, unrestricted nonprofit use of
  20. this software.  Please feel free to modify, distribute, and share this
  21. software as long as you aren't making any money from it.  If you want
  22. to use this code in a profit making environment, please contact the
  23. author for permission. 
  24.  
  25.      The current release of TVX has several different versions:
  26.  
  27. 1) Standard TVX - The original version and command set of TVX. 
  28. 2) VIX - A version of TVX that emulates the Unix vi editor. 
  29. 3) TVX0 - A modeless version of TVX. 
  30. 4) EMAX - A version of TVX that emulates the EMACS editor. 
  31.  
  32.      The main part of this manual is written describing "Standard
  33. TVX," the version used by the author.  The VIX, TVX0, and EMAX
  34. versions are described in appendices.  While the emulator versions of
  35. TVX are close command set compatible versions of the original editors,
  36. the you should be aware that certain fundamental properties of the
  37. underlying TVX editor remain, and that the emulators will not work
  38. exactly like the originals.  If you intend to use one of the other
  39. versions of TVX, you should read this part of the manual up to the
  40. section describing standard TVX commands first. 
  41.  
  42.  
  43. *** General Comments ***
  44.  
  45.      Standard TVX functions almost identically for all versions,
  46. including the command set.  The emulation versions of TVX have been
  47. written to be command set compatible with the original versions of the
  48. editors.  It is also possible to construct a completely new version of
  49. TVX with a custom command set.  Control codes on are normally entered
  50. by pressing the CTRL key and the letter key at the same time.  On most
  51. versions, the character delete key is BACKSPACE.  This character
  52. delete key is the one normally used by the respective operating
  53. system.  It is up to the local implementation to notify the user of
  54. any variance from these conventions. 
  55.  
  56.      Once the file has been read in, the screen will be cleared, and
  57. the first screenful of the file printed on the screen and the cursor
  58. positioned over the first character of the file.  If a new file is
  59. being created, the message "buffer empty" will be displayed, and the
  60. cursor positioned in the upper left corner.  TVX is then ready to
  61. accept commands from the keyboard.  TVX works on the principle that
  62.  
  63.  
  64.                                  -1-                                  
  65.  
  66.  
  67.  
  68.  
  69. TVX Reference Manual                                            3/8/87
  70.  
  71.  
  72. what you see is what you get.  Most commands also take an optional
  73. numeric count.  The default count is always one.  Commands that allow
  74. a count value are preceded by the letter 'n' in the following
  75. descriptions.  Whenever a command produces output or an error message,
  76. it appears on the bottom line of the screen. 
  77.  
  78.      The BACKSPACE key (Control-H on some terminals) is used to edit
  79. input text.  When TVX is accepting commands, BACKSPACE will cause the
  80. character immediately before the cursor to be deleted. 
  81.  
  82.      TVX (all versions!) works entirely in the available memory for
  83. editing.  The text from the file which is being edited is held in a
  84. buffer in main memory.  If a file is particularly large, it may not
  85. entirely fit into main memory.  The MS-DOS versions, for example, will
  86. allow about 50K characters, depending on the memory available.  Unix
  87. versions will usually allow 120,000 characters and 5000 lines in one
  88. buffer.  If the entire file will not fit into the buffer at once, then
  89. only part of it is read in at a time.  The buffer size limit in no way
  90. restricts the total size of a file that can be edited by TVX.  To make
  91. editing large files easier, some commands apply to the entire file and
  92. cause automatic cross buffer manipulation. 
  93.  
  94.      Because of the internal organization of the text within the
  95. buffer, TVX may occasionally "compact" the tiny fragments of unused
  96. buffer space generated as a part of normal editing.  When this
  97. happens, a message is displayed, and input keystrokes are remembered
  98. but not echoed until the compaction process is complete.  The process
  99. may take several seconds. 
  100.  
  101.      TVX actually divides the internal memory into two parts: the text
  102. buffer and the save buffer.  The text buffer (or simply the buffer) is
  103. used to hold the file (or part of the file) being edited.  There is
  104. only one such text buffer (unlike some other editors such as emacs).
  105. The save buffer is used for moving text, both from one part of the
  106. text buffer to the other, as well as to and from external files.  The
  107. maximum size of the save buffer depends on the amount of text
  108. currently residing in the main text buffer.  The following diagram
  109. shows the internal TVX memory organization:
  110.  
  111.    +-----------------------------+
  112.    |  TEXT BUFFER - the current  |
  113.    |  text (or portion) of file  |
  114.    |  being edited. (grows down) |
  115.    |            _________________|
  116.    |___________|                 |
  117.    |  free memory        ________|
  118.    |_____________________|       |
  119.    |  SAVE BUFFER - grows up     |
  120.    +-----------------------------+
  121.  
  122.      Text is added to the text buffer when the file is first read in
  123. (or created).  If the file doesn't fit into one buffer, you will have
  124. to manually "page" the text into the buffer.  Text is added to the
  125. save buffer in one of several ways.  TVX (and emulators) have commands
  126. to move text from the text buffer to the save buffer, and move the
  127. contents of the save buffer to the text buffer.  TVX also has "cut
  128.  
  129.  
  130.                                  -2-                                  
  131.  
  132.  
  133.  
  134.  
  135. TVX Reference Manual                                            3/8/87
  136.  
  137.  
  138. mode".  When cut mode is enabled, when lines are killed, they are
  139. automatically copied into the save buffer as well as being deleted
  140. from the text buffer.  Cut mode is normally off for TVX, but is on for
  141. VIX and EMAX.  It is also possible to save the contents of the save
  142. buffer to a new external file, and to load the save buffer from an
  143. external file.  All versions of TVX use this scheme for handling
  144. text. 
  145.  
  146.      End of lines are not special to TVX.  Thus all the cursor
  147. movement commands and delete single character commands will treat the
  148. end of line as just another character.  This also means that a
  149. <Return> (end of line) is a valid search character, and thus makes it
  150. impossible to end a find pattern with a <Return>.  The <Escape> key is
  151. used to mark the end of a find pattern.  All the Standard TVX wild
  152. cards may be used for all versions of TVX. 
  153.  
  154.      Another basic concept of TVX is the "last thing." Whenever TVX
  155. finds a pattern from the search command, skips over a word, or gets
  156. from or puts to the save buffer, that text is considered the "last
  157. thing." All versions of TVX will have a command that can delete the
  158. last thing.  While this is this a powerful editing concept, it does
  159. have some consequences.  First, the cursor will always be placed AFTER
  160. the pattern just found.  It also means that TVX has no delete word
  161. commands.  Instead, the delete last thing command is used after
  162. skipping over a word.  Using the delete last thing also makes it very
  163. easy to save text into the save buffer, and then deleting it after the
  164. desired number of lines have been saved. 
  165.  
  166.      Probably the most powerful editing tool provided by TVX is the
  167. repeat loop.  This allows arbitrary command sequences to be entered,
  168. and repeated any number of times.  All versions of TVX will have at
  169. least 5 different repeat buffers.  All emulation versions of TVX use
  170. the basic TVX repeat loop instead of emulating whatever macro facility
  171. might be provided by the original editor.  (The commands inside the
  172. repeat loop are the emulated commands, not standard TVX commands.)
  173.  
  174.      Many of the basic operating characteristics of TVX are
  175. controllable by user settable parameters.  These parameters are
  176. relevant to all versions of TVX, with the current status of each
  177. displayed on the help screen.  These parameters are summarized in the
  178. 'set parameter' command (':') in the Standard TVX Commands section,
  179. but a brief overview of the parameters will also cover some of the
  180. capabilities of TVX (and the emulator versions). 
  181.  
  182.      While the normal screen is only 80 columns wide, TVX has been
  183. written to support a "virtual" screen width of 240 columns.  As you
  184. move the cursor right on a line that is longer than 80 columns, the
  185. screen will automatically scroll to the left in increments of 16
  186. columns.  You can also control how many lines of the screen TVX uses
  187. using the 'v' parameter.  Normally, TVX will use the entire screen.
  188. If you are working over phone lines, you can tell TVX to use only 5 or
  189. 7 lines, thus making updating much faster. 
  190.  
  191.      TVX has some limited word processing capability.  This is the
  192. autowrap feature, settable both when you first run TVX, and by the 'w'
  193. parameter.  Setting autowrap to column 65, for example, will tell TVX
  194.  
  195.  
  196.                                  -3-                                  
  197.  
  198.  
  199.  
  200.  
  201. TVX Reference Manual                                            3/8/87
  202.  
  203.  
  204. to automatically insert a newline whenever you enter text past that
  205. column.  The 'tidy' command will use the autowrap margin to 'fill' the
  206. text after the fact.  This feature makes it easy to make your text
  207. more readable, and even create good looking short memos without
  208. needing to resort to nroff or troff. 
  209.  
  210.      For programmers, TVX has an autowrap command.  The 'a' parameter
  211. controls this feature.  When enabled, TVX will automatically match the
  212. leading white space at the beginning of the previous line. 
  213.  
  214.      The search command also has some advanced features.  By default,
  215. searches are case insensitive, but the 'f' parameter controls this.
  216. TVX also supports a set of "wild cards".  You can specify a set of
  217. letters, numbers, alphanumerics, punctuation, or other characters as
  218. part of the wild cards.  The 'u' parameter also allows you to define
  219. your own set of wild card characters.  TVX remembers the last pattern
  220. found (the actual pattern, not just the wild cards), and has a command
  221. to insert that pattern into the text.  Thus, with repeat loops, wild
  222. cards, and the insert found pattern command, it is possible to do
  223. quite creative editing functions.  The 'm' parameter controls the use
  224. of wild card matching, so it can be disabled if you need to match one
  225. of the wild card characters. 
  226.  
  227.      Finally, TVX has parameters to control just how the screen is
  228. scrolled.  The home display line controlled by the 'd' parameter tells
  229. TVX which line to put the cursor on when the screen has been
  230. 'verified'.  The 's' scroll window controls how many lines the cursor
  231. will move up and down from the home line before scrolling the text.
  232. If the scroll window is 0, then the cursor will be fixed on the home
  233. display line.  By setting it to another value, you can control how
  234. much context remains before scrolling.  These settings are very much
  235. personal taste. 
  236.  
  237.      TVX uses two techniques for protecting the original file from
  238. editing mistakes.  First, each time a file is edited, a new version is
  239. created, and the previous version retained in its original form as a
  240. backup.  This file will change the original file extension to '.BAK'
  241. on MS-DOS systems, and '.B' on Unix.  A more complete description of
  242. TVX file handling is included in an appendix.  Also, as you edit your
  243. file, TVX has the capability to write all commands entered during the
  244. session to a log file when that capability is enabled.  In the event
  245. of a major editing mistake, it is possible to edit that log file to
  246. remove the command errors, and then apply that "command" file to the
  247. previous version of the edited file to get back to the state right
  248. before the mistake.  This feature also allows files of TVX commands to
  249. be defined by the user and executed in one step.  The last section of
  250. the Reference Manual explains how to use the command file feature. 
  251.  
  252.  
  253.  
  254. *** RUNNING THE EDITOR ***
  255.  
  256.      To edit a file using TVX, enter the following command line:
  257.  
  258.           tvx filename -switch1 -switch2 ...
  259.  
  260.  
  261.  
  262.                                  -4-                                  
  263.  
  264.  
  265.  
  266.  
  267. TVX Reference Manual                                            3/8/87
  268.  
  269.  
  270.      (VIX, EMAX, and TVX0 use the SAME command line format and
  271. switches.) The file name specified is the file to be edited, and must
  272. obey the conventions used by the local operating system (the MS-DOS
  273. version requires DOS version 2.0, and supports pathnames).  If the
  274. file is a new file (does not exist), TVX will ask if you really want
  275. to create it.  Answer y or n. If you gave an incorrect name, you may
  276. give the correct name, but the switches entered on the original start
  277. line will remain in effect.  Control-C can be used at this point to
  278. abort. 
  279.  
  280.      TVX has several switches which control certain operating
  281. characteristics.  Each switch begins with a minus (-), and is
  282. separated from the file name and other switches by a blank in the
  283. standard UNIX/C convention.  Some switches may be negated by using a
  284. 'nox' form.  Thus, '-b' will cause a .bak file to be generated, while
  285. a '-nob' causes the .bak file to be deleted on exit from the editor.
  286. This capability is indicated by []'s.  As many switches as necessary
  287. or desired can be used at one time in any order.  A ':' may be used
  288. instead of a '=' for '-o'.  The various switches supported include:
  289.  
  290.      -[no]b -- generate a .B[AK] version of the original (the usual
  291.           default).  The -nob option means no .BAK file is generated.
  292.           This latter mode of operation follows the normal Unix
  293.           convention of not keeping past generations of a file. 
  294.      -[no]i -- auto indent mode enabled. 
  295.      -[no]l -- generate BACKUP.LOG file. 
  296.      -o=filename -- send edited output to filename.  The output file
  297.           can also be changed at any time during the editing session
  298.           with the ':o' command. 
  299.      -r -- read only - file can be read in only
  300.      -s -- big save buffer - leaves more buffer for save file
  301.      -w -- word processing mode - sets autowrap on, margin to 65. 
  302.      -x=cmds -- After reading in the file, execute the tvx commands
  303.           following the '='.  This is useful to go the the 47th line
  304.           of the file, for example: "tvx file -x=46d". 
  305.      -z -- -z means use Control-Z to mark end of file, -noz means
  306.           don't use.  This switch is used only on MS-DOS
  307.           implementations. 
  308.      -# -- entering a number from 3 up to the number of lines on the
  309.           screen will create a smaller TVX editing window.  This is
  310.           most useful for slower baud rates.  A -7 makes a nice, small
  311.           window showing 7 lines. 
  312.  
  313.      TVX is mostly a programmer's editor, and can can edit any
  314. standard text line file.  On Unix systems, it is an alternative to
  315. standard editors such as ed or vi. 
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.                                  -5-                                  
  329.  
  330.  
  331.  
  332.  
  333. TVX Reference Manual                                            3/8/87
  334.  
  335.  
  336.                *** Summary of Standard TVX Commands ***
  337.  
  338.  
  339.  
  340.      A key to success when using TVX is to remember that there are two
  341. modes of operation.  The normal mode is command mode.  In this mode,
  342. all keystrokes are interpreted as commands.  When you want to enter
  343. text, you must enter insert mode with the 'I' command.  While in
  344. insert mode, all keystrokes entered will be inserted into the file and
  345. displayed on the screen.  You must exit from insert mode with the
  346. escape key.  When you enter insert mode, the message "### Insert Mode
  347. ###" will be displayed on the last line of the display.  Also, on many
  348. terminals, TVX will change the cursor shape between command and insert
  349. mode. 
  350.  
  351.      The modeless version of TVX (TVX0) uses the same mnemonics as
  352. Standard TVX for the most part.  There is a 1:1 mapping between the
  353. commands.  The modeless names for each command is included in each
  354. description of Standard TVX commands.  Counts for any modeless TVX
  355. command can be entered after the escape.  Thus, "<Esc>10K" will kill
  356. ten lines, while <Esc>10^K" will kill 10 characters. 
  357.  
  358.      Notes: An n preceding a command means optional numeric
  359.      argument may be supplied.  If omitted n will default to 1,
  360.      and n can be zero or negative if appropriate.  '$'
  361.      represents the escape key, and is used as a terminator for
  362.      insert, find, and loops.  Control commands are indicated
  363.      with '^'.  For example, '^K' represents Control-K, and is
  364.      usually entered by simultaneously holding down the CTRL key
  365.      and the K key. 
  366.  
  367.  
  368. nA - Append to Save Buffer
  369.  
  370.      The 'A' command is used to append lines of text to the end of the
  371. save buffer, even if other commands have been used since the last 'A'
  372. or 'S' command.  The append command works exactly like the 'S' command
  373. otherwise. 
  374.  
  375.  
  376. B - Buffer beginning {TVX0: ^B}
  377.  
  378.      A 'B' causes the cursor to be moved to the beginning of the
  379. current buffer. 
  380.  
  381.  
  382. ^B - Beginning of file {<Esc>B}
  383.  
  384.      The '^B' (Control-B) command is used to position the cursor to
  385. the absolute beginning of the file.  The '^B' command will always
  386. write out the rest of the file, then re-read the first buffer full.
  387. This command has the side effect of making a new backup version of the
  388. file.  It should be noted that any text saved in the save buffer will
  389. be preserved during this operation, so that the 'S' save command can
  390. be used to move text from the end to the beginning of a multi-buffer
  391. file.  The search pattern and repeat loops are retained as well.  Note
  392.  
  393.  
  394.                                  -6-                                  
  395.  
  396.  
  397.  
  398.  
  399. TVX Reference Manual                                            3/8/87
  400.  
  401.  
  402. the '^B' file beginning is similar in concept to 'B' buffer
  403. beginning. 
  404.  
  405.  
  406. nC - Change {^C}
  407.  
  408.      'C' can be used to change characters.  Entering 'nC' is exactly
  409. equivalent to entering 'nKI'.  The command will cause 'n' characters
  410. to be killed, and insert mode to be entered.  The escape must be used
  411. to terminate the insert as usual. 
  412.  
  413.  
  414. nD - Down {^D}
  415.  
  416.      'D' moves the cursor down n lines.  The cursor is placed at the
  417. beginning of the new line.  For convenience, the ENTER key performs
  418. the identical function. 
  419.  
  420.  
  421. n^D - Down in column {<Esc>D}
  422.  
  423.      Control-D ('^D') is similar to 'D', except the cursor remains in
  424. the original column.  Columns are defined as characters from the
  425. beginning of the line, so if a line has tab characters in it, the
  426. cursor may appear to move out of column on the screen. 
  427.  
  428.  
  429. E - End of the buffer {^E}
  430.  
  431.      'E' causes the cursor to be placed at the end of the current text
  432. buffer. 
  433.  
  434.  
  435. n^E - Edit repeat buffer n {<Esc>E}
  436.  
  437.      When making repeat loops, it is easy to make a mistake.  The ^E
  438. command allows any of the repeat buffers to be edited, and then the ^R
  439. command can save the corrected repeat buffer back.  If you don't give
  440. a value for n, the currently selected buffer is used.  If n is from 1
  441. to the maximum number of repeat buffers, then that repeat buffer will
  442. be selected for editing. 
  443.  
  444.      The ^E command will insert the contents of the selected repeat
  445. buffer into the current text buffer.  The repeat buffer will be
  446. inserted above the current text line.  The repeat buffer will start
  447. with a sequence of '#n:<', where n will be replaced by the repeat
  448. buffer being edited.  The '#n:' identifies which buffer you are
  449. editing, and is used by the ^R store repeat buffer command to identify
  450. the buffer to save to.  Escapes will be represented by '^[' instead of
  451. the '$' used when entering a repeat buffer initially.  A '>^[^['
  452. identifies the end of the repeat loop. 
  453.  
  454.      It is possible to make as many changes as needed to the repeat
  455. loop.  Escapes can be added by using '27i'.  If you want to save the
  456. loop in a different buffer, you can change the number after the '#'.
  457. It is also important to maintain the '#n:<' start and '>^[^[' ending
  458.  
  459.  
  460.                                  -7-                                  
  461.  
  462.  
  463.  
  464.  
  465. TVX Reference Manual                                            3/8/87
  466.  
  467.  
  468. sequences.  Also, loops are limited to a maximum of 100 characters.
  469. You can have carriage returns within the body of a loop, too.  If you
  470. want to create a new buffer, you can use ^E on an empty repeat buffer
  471. to get the required '#n:<>^[^[' loop sequence. 
  472.  
  473.      After you have edited the repeat buffer, it can be saved with the
  474. '^R' command.  You must place the cursor anywhere on the first line of
  475. the repeat buffer before using '^R'.  When you press ^R, the buffer
  476. will be saved in the buffer indicated right after the '#'.  Thus,
  477. unlike ^E, the ^R command accepts no n value. 
  478.  
  479.  
  480. nF - Find text pattern {^F}
  481.  
  482.      'F' is used to find a text pattern.  When 'F' is entered, the
  483. message 'Find?' is echoed on the bottom line.  You then enter the
  484. pattern to find, terminated with the escape key (echoed as $).  When
  485. the count 'n' is positive (which is the default), find searches the
  486. current buffer from the current position forward.  If 'n' is negative,
  487. then a backwards search is performed starting with the previous line.
  488. (Use '^F' to search across buffers).  Normally, 'F' ignores the case
  489. of the letters in the pattern.  If the ':F' parameter is set with 0,
  490. then 'F' command will match only the exact case.  See the ':' set
  491. parameter command for details of the ':F' parameter.  If the pattern
  492. is not found, "Not found" will be printed and the cursor remain at its
  493. original location.  If the pattern is found, then the cursor will be
  494. placed immediately following the pattern.  The pattern may be at most
  495. 100 characters long.  If the pattern is only an escape, then the
  496. previous pattern will be used again (same as ';'). 
  497.      TVX supports extensive wild card matching.  The ':M' set
  498. parameter controls whether or not wild card matching is turned on.
  499. Normally, it is.  The wild card matching in TVX is based on the
  500. concept of 'sets of special characters'.  TVX predefines 6 sets of
  501. characters, and allows the user to define one additional set.  When a
  502. special control character is included as part of the find pattern,
  503. then any character in the specified set will match the pattern.  The
  504. predefined sets are:
  505.  
  506.     ^A - Alphanumeric characters: a-z, 0-9
  507.     ^D - Digits: 0-9
  508.     ^L - Letters: a-z
  509.     ^O - Other characters: all characters except a-z, 0-9
  510.     ^P - Punctuation: '.', ',', '!', '?'
  511.     ^X - Any character: any printable character
  512.     ^U - User character: any character in user set, set by ':U'
  513.  
  514.      Any of the sets may be specified by entering the proper control
  515. character in the find pattern: Control-A for the ^A set.  Thus,
  516. entering a find pattern of '^L^D' would match any letter followed by
  517. any digit.  Since it may be desirable to match a sequence of one of
  518. the character sets, two prefix characters are supported.  A '^W'
  519. before one of the above sets will match a 'word' of that set.  Thus,
  520. '^W^L' will match any word, and '^N^D' will match any number.  The
  521. find pattern 'st^W^L' would match words starting with 'st'.  The '^N'
  522. prefix is used to make a 'word' of characters NOT included in the
  523. given set.  Thus, '^N^L' will match a 'word' of characters NOT
  524.  
  525.  
  526.                                  -8-                                  
  527.  
  528.  
  529.  
  530.  
  531. TVX Reference Manual                                            3/8/87
  532.  
  533.  
  534. including the letters a-z.  A match 'word' consists of any sequence of
  535. characters (at least one character long) found in the given set, up to
  536. the first character not in the set.  End of lines also terminate all
  537. wild card patterns.  The only real way to adequately understand TVX
  538. wild cards is to use them in practice. 
  539.  
  540.  
  541. ^F- Find across buffers {<Esc>F}
  542.  
  543.      '^F' (Control-F) is the same as Find, except the search will
  544. cross buffer boundaries.  Whenever a buffer is searched without
  545. finding the pattern, the next buffer will be read in.  The screen will
  546. not change until the pattern is found or the file is exhausted.  If
  547. the pattern is not found anywhere, then the entire file will have been
  548. written out, and there will be an empty buffer.  The '^B' command may
  549. be used at that point to get back to the beginning of the file. 
  550.  
  551.  
  552. G - Get saved text {<Esc>G}
  553.  
  554.      'G' is used with 'S' and '^Y' to move text around.  'G' causes
  555. the text in the save buffer to be inserted before the current cursor
  556. position.  The saved text remains in the save buffer.  There must be
  557. at least one line of text in the main buffer before 'G' will get the
  558. text from the save buffer. 
  559.  
  560.  
  561. ^G - Get killed line (unkill) {^G}
  562.  
  563.      The '^G' (Control-G) unkill command can be used to "unkill" one
  564. line, which will be the last line killed with '^K'.  If the last
  565. command was 10^K (kill 10 lines), then '^G' will retrieve only the
  566. last line killed.  The "unkilled" line will be inserted right before
  567. the current cursor position.  It is also possible to move single lines
  568. around the text buffer using '^K' and '^G' - but be cautious.  Any
  569. other '^K' command will reset the last killed line.  '^G' can also be
  570. used to retrieve the entire line involved in a "'" (single quote) or
  571. '"' (double quote) command. 
  572.  
  573.  
  574. nH - Half page {<Esc>H}
  575.  
  576.      'H' is similar to the 'P' Page command.  It causes the cursor to
  577. move down a half screenful.  This will be typically be 12 lines.  A
  578. negative count (e.g.  -h) moves up a half screen. 
  579.  
  580.  
  581. nI - Insert {<Esc>I}
  582.  
  583.      'I' causes the editor leave command mode and enter insert mode.
  584. Following the 'I', all text typed in is inserted into the file until a
  585. terminating escape is typed.  Inserted text is echoed on the screen as
  586. it is inserted.  If any value is supplied for n (the default no n is
  587. not used), then only one character is inserted, and it will have the
  588. ascii value of n. This is the method used to enter characters that
  589. cannot normally be entered in insert mode, such as escape or
  590.  
  591.  
  592.                                  -9-                                  
  593.  
  594.  
  595.  
  596.  
  597. TVX Reference Manual                                            3/8/87
  598.  
  599.  
  600. characters not on the keyboard.  The message "### Insert Mode ###" is
  601. displayed on the bottom line when insert mode is entered (except when
  602. inserting on the very last line of the file).  Many versions of TVX
  603. will change the shape of the cursor when insert mode is entered.
  604. {Insert is useful in the modeless version of TVX for entering either
  605. single characters (<Esc>nI), or when several control characters will
  606. be entered (e.g., ^L).}
  607.  
  608.  
  609. J - Jump back {<Esc>J}
  610.  
  611.      The 'J' command will cause a "jump" back to the line of the
  612. previous cursor position.  Suppose the cursor was positioned somewhere
  613. in the middle of the file.  If the 'E' end command was entered, the
  614. cursor would move to the end of the current buffer.  If the 'J'
  615. command was then used, the cursor would return to the original line.
  616. It makes it convenient to flip back and forth between two points in
  617. the file.  It is also useful if a large cursor movement command is
  618. accidentally entered (like when you thought you were in insert mode). 
  619.  
  620.  
  621. nK - Kill Character forward {^K}
  622.  
  623.      The 'K' command kills or deletes characters in a forward
  624. direction.  '1K' would delete the character the cursor is positioned
  625. over, and '5K' would delete the next 5 characters. 
  626.  
  627.  
  628. n^K - Kill lines {<Esc>K}
  629.  
  630.      '^K' (Control-K) is used to kill an entire line.  n=1 kills the
  631. current line, negative n kills previous lines, while positive n kills
  632. following lines. 
  633.  
  634.  
  635. nL - Left {^L}
  636.  
  637.      'L' moves the cursor n characters to the left. 
  638.  
  639.  
  640. M - Memory and Status {<Esc>M}
  641.  
  642.      The 'M' command is used to display certain status information.
  643. The name of the file currently being edited (where the output will go)
  644. is displayed, followed by the version of TVX.  The number of free
  645. characters currently available in the buffer is then given (this does
  646. not include characters that are free but not compacted yet), followed
  647. by the number of the last line of the file.  Finally, the currently
  648. selected repeat loop buffer and maximum number of repeat buffers
  649. allowed is shown. 
  650.  
  651.  
  652. nN - Note current location {^N}
  653.  
  654.      This command notes the current line location.  Values of 1 to 9
  655. are allowed for n. After entering '3n' for example, you can then move
  656.  
  657.  
  658.                                  -10-                                 
  659.  
  660.  
  661.  
  662.  
  663. TVX Reference Manual                                            3/8/87
  664.  
  665.  
  666. around the buffer, and later use '3^n' to return to the noted
  667. location.  This command really remembers the current line, relative to
  668. the current buffer beginning.  Thus if you edit out lines before the
  669. noted location, you will not return to the same line. 
  670.  
  671.  
  672. n^N - Go back to noted location {<Esc>N}
  673.  
  674.      This command is used to go back to a noted location. 
  675.  
  676.  
  677. nO - Open line for insert {^O}
  678.  
  679.      The 'O' command will cause n blank lines to be inserted, and the
  680. cursor positioned at the beginning of the first new line.  Following
  681. the 'O' command, insert mode is automatically entered.  The 'O'
  682. command is a convenient method for inserting new lines. 
  683.  
  684.  
  685. ^O - Operating System call {<Esc>O}
  686.  
  687.      Some versions of TVX (MS-DOS and Unix, for example), will allow
  688. an operating system command to be executed from inside of the editor.
  689. For example, it might be useful to get a directory listing.  On
  690. MS-DOS, after entering the ^O, the normal 'dir' command is entered.
  691. After the directory is shown by the operating system, pressing any key
  692. will return to the edited file. 
  693.      This command has one particularly valuable application - editing
  694. other files.  For example, you may want to add part of another file to
  695. the file you are currently editing.  Use the '^O' command to edit the
  696. other file, and create a temporary file with the part you want to
  697. add.  Then you can use the '^Y' yank command to read in the file.  For
  698. example: Use '^O' to get enter operating system command prompt.  Then
  699. enter something like 'tvx otherfile -o=tempfile'.  You will get a new
  700. copy of tvx with the otherfile being edited.  Edit it to get the part
  701. you want.  When you exit that copy of tvx, the part you want to add
  702. will be in tempfile.  You can now yank it into the current file. 
  703.  
  704.  
  705. nP - Page {^P}
  706.  
  707.      The 'P' commands is the same as '25D' on 24 line terminals, and
  708. effectively causes a new screenful to be written.  It is a convenient
  709. method for scanning through the file.  The n count argument specifies
  710. the number of 'pages' to scroll.  Negative values for n causes reverse
  711. scrolling. 
  712.  
  713.  
  714. ^P - Print Screen {<Esc>P}
  715.  
  716.      If '^P' (Control-P) is entered, and a printer is on line, the
  717. entire contents of the screen will be sent to the printer.  Several
  718. consecutive sequences of "P^PP^P..." (or a repeat loop: "10<P^P>$$")
  719. can be used to print longer portions of the file.  This command will
  720. not normally work on time shared systems such as Unix. 
  721.  
  722.  
  723.  
  724.                                  -11-                                 
  725.  
  726.  
  727.  
  728.  
  729. TVX Reference Manual                                            3/8/87
  730.  
  731.  
  732. nR - Right {^R}
  733.  
  734.      'R' causes the cursor to move n characters to the right.  For
  735. convenience, the space bar is equivalent to 'R'. 
  736.  
  737.  
  738. ^R - Restore repeat buffer {<Esc>R}
  739.  
  740.      The '^R' command will save an edited repeat buffer and delete the
  741. edited buffer from the text.  See '^E' for a complete summary of
  742. editing repeat buffers. 
  743.  
  744.  
  745. nS - Save text {<Esc>S}
  746.  
  747.      Besides the normal text buffer, TVX has a separate "save"
  748. buffer.  This buffer can be used to move blocks of text from one part
  749. of the file to another.  A simple 'S' command will save the current
  750. line in the save buffer, and move the cursor down one line.  On the
  751. screen, 'S' appears to have the same behavior as 'D'.  If n is
  752. supplied, then n lines will be saved.  'S' can also be used
  753. sequentially.  If no other commands intervene, consecutive 'S'
  754. commands will continue adding lines to the save buffer.  If any other
  755. commands are entered between consecutive 'S' commands, the previous
  756. contents of the save buffer will be lost, and replaced with the new
  757. line.  The 'A' command can be used to append lines to the current save
  758. buffer without losing the previous contents. 
  759.      The '/' command can be used with 'S' and 'G' to move text.  Use
  760. 'S' to save the text to be moved, immediately delete the saved text
  761. with '/', then insert it at the new place with 'G'.  The last line of
  762. the file is can be saved in the save buffer only once, and an error
  763. message will be printed if you attempt to save the last line a second
  764. time. 
  765.  
  766.  
  767. nT - Tidy text {^T}
  768.  
  769.      The 'T' tidy command is specifically designed to improve the
  770. appearance of strictly text files.  When entering letters and
  771. documents, is it usually desirable to have the lines filled to the
  772. right margin.  However, after editing, it is common to find a jumble
  773. of uneven, difficult to read source lines.  The 'T' tidy command will
  774. fill source text using the same right margin currently set for
  775. auto-wrap. 
  776.      Tidy performs essentially the same operation as a word processor
  777. fill function.  Word are combined on one line until the auto-wrap
  778. margin is passed.  The 'n' count refers to the total number of
  779. resulting lines, not the number of original lines.  Specifying a large
  780. 'n' will tidy large sections of a document.  The tidy command
  781. recognizes lines beginning with blanks, tabs, or a period and blank
  782. lines as special.  It will not fill those lines, thus preserving
  783. paragraphs, tables and NROFF-like dot commands. 
  784.      One interesting capability of tidy is to put one word per source
  785. line.  Set the auto-wrap margin to 2, then use the tidy command.  The
  786. result will put one word per line. 
  787.  
  788.  
  789.  
  790.                                  -12-                                 
  791.  
  792.  
  793.  
  794.  
  795. TVX Reference Manual                                            3/8/87
  796.  
  797.  
  798. ^T - TERMINATE - ABORT EDIT SESSION {<Esc>T}
  799.  
  800.      The '^T' (Control-T) command aborts directly to the operating
  801. system.  The original file is left untouched, and no backup file is
  802. created.  This is a fairly dangerous command in that all editing
  803. performed will be lost (unless the '^B' file beginning command was
  804. used).  You will be asked to confirm the '^T' command with a Y or N.
  805. If the '^T' is performed accidentally, the backup log file can be
  806. applied to the current version of the file after the '^T' has been
  807. edited out of the log file (no backup file will have been created
  808. after the '^T').  The '^T' command is most useful when you decide you
  809. don't want to make any changes and want to exit from TVX quickly.
  810. Exiting with the '^T' command is similar to using the 'R' read only
  811. switch at the beginning. 
  812.      If you have used the '^B' command, a work file copy of the
  813. original will have been written out containing all the edits performed
  814. before the '^B'.  When you use '^T' and this work file has been saved,
  815. a message informing you of its existence will be printed.  You can
  816. then either use that file, or delete it at the operating system
  817. level. 
  818.  
  819.  
  820. nU - Up {^U}
  821.  
  822.      The 'U' command moves the cursor up n lines, positioning the
  823. cursor at the beginning of the line. 
  824.  
  825.  
  826. n^U - Up in column {<Esc>U}
  827.  
  828.      The '^U' (Control-U) is the opposite of '^D', and moves the
  829. cursor up in column. 
  830.  
  831.  
  832. nV - Verify the screen {^V}
  833.  
  834.      In regular screen editing mode, the 'V' command causes the screen
  835. to be rewritten.  This is sometimes necessary to get a true version of
  836. the screen after error messages have been written or when editing
  837. lines longer than 80 columns.  On terminals without reverse screen
  838. scroll, the 'V' command forces the cursor to the home display line
  839. (usually line 16). 
  840.  
  841.  
  842. n^W - Write out buffer, read next one {<Esc>W}
  843.  
  844.      The '^W' (Control-W) command is used to explicitly go from one
  845. buffer to the next.  By default, when n is >= 0, the entire current
  846. buffer is written to the new version of the file being edited, and the
  847. next buffer full of the original file (if any) is read in.  If a
  848. negative n is supplied (any negative value, most easily -^W), then
  849. only the part of the buffer up to (but not including) the current line
  850. is written.  Then as much more of the file as possible is read to the
  851. end of the current buffer.  Thus, a negative n is useful when a file
  852. won't fit, and the split point is at an awkward place.  It is also
  853. useful when a '^Y' yanked file won't fit. 
  854.  
  855.  
  856.                                  -13-                                 
  857.  
  858.  
  859.  
  860.  
  861. TVX Reference Manual                                            3/8/87
  862.  
  863.  
  864. ^X - eXit {<Esc>X}
  865.  
  866.      '^X' (Control-X) causes the remainder of the file to be written
  867. out, and the editor exited.  The entire file will be written, no
  868. matter where the cursor happens to be positioned when the '^X' command
  869. is entered.  This is the normal conclusion of an editing session.  All
  870. work files are deleted, the original file renamed to the back up file,
  871. and the newly edited file renamed to the original name.  See the
  872. appendix on tvx file handling conventions for more details. 
  873.  
  874.  
  875. n^Y - Yank text to/from external file (file merge) {<Esc>Y}
  876.  
  877.      A '^Y' (Control-Y) with a positive n is similar to 'S' save, but
  878. the text saved in the save buffer is read in from an external file
  879. instead of from the current buffer.  When '^Y' is entered, the save
  880. buffer is cleared, the buffer compactor invoked, and then the user is
  881. prompted for the name of the file to read.  TVX then will read as much
  882. of the external file into the save buffer as it can.  The 'G' command
  883. can then be used to insert the save buffer text into the current file
  884. at the desired location.  If there is not enough room in the save
  885. buffer to hold the entire file, then only part of the file is read and
  886. a diagnostic message printed.  The '-S' switch can be used when TVX is
  887. first invoked to reserve a large save buffer for merging larger
  888. files.  You can also use the '-^W' command to write out the front part
  889. of the file, and then 'G' to get the saved file.  (Note: '^Y' may not
  890. be used from within a log command file.  See section on backup log
  891. file.)
  892.      A negative n (e.g., '-^Y') can also be used with the yank
  893. command.  If the n is negative, then the contents of the save buffer
  894. will be written to a new file.  After '-^Y' is entered, you will be
  895. prompted for the name of the output file, and then the contents of the
  896. save buffer will be written to that file. 
  897.  
  898.  
  899. nBACKSPACE - Delete previous character {BS}
  900.  
  901.      The BACKSPACE key will delete the previous character on the
  902. screen.  It is also used for editing input keystrokes for Insert,
  903. Find, and repeat loops. 
  904.  
  905.  
  906. n; - Find again
  907.  
  908.      The ';' (semicolon) command causes the previous pattern to be
  909. searched for again.  This is more convenient that entering 'F$'
  910. again.  The 'n' has the same meaning, positive searches forwards,
  911. negative backwards. 
  912.  
  913.  
  914. / - delete last thing {<Esc>/}
  915.  
  916.      The '/' (slash) command is useful when used with 'F' (find), 'S'
  917. (save), 'G' (get), 'TAB' (word right), and '{' (word left).  It causes
  918. the last pattern used to be deleted.  Thus "Fxxx$/Iyyzz$" will delete
  919. the pattern 'xxx' and insert 'yyzz'.  When used after an 'S', it
  920.  
  921.  
  922.                                  -14-                                 
  923.  
  924.  
  925.  
  926.  
  927. TVX Reference Manual                                            3/8/87
  928.  
  929.  
  930. causes the just saved lines to be deleted from the text buffer (but
  931. not the save buffer).  After the G, it causes the text just inserted
  932. from the save buffer to be deleted from the text buffer.  After a
  933. 'TAB' or '{', '/' will delete the word or words just skipped over.
  934. Slash must be used immediately following an 'S', 'G', 'TAB', '{', 'F',
  935. '^F', or ';' command.  This command knows how to take wild card
  936. matches into account. 
  937.  
  938.  
  939. = - delete last thing and enter insert mode {<Esc>=}
  940.  
  941.      The '=' (equals) command is the same as the '/' command, except
  942. insert mode is automatically entered, thus achieving the effect of
  943. '/I' command sequence. 
  944.  
  945.  
  946. ' - Delete previous part of line (single quote) {<Esc>'}
  947.  
  948.      The "'" command will delete all the characters in the current
  949. line before the cursor. 
  950.  
  951.  
  952. " - Delete rest of line (double quote) {<Esc>"}
  953.  
  954.      The '"' command will delete from the cursor forward to the end of
  955. the line.  The "end of line" mark will remain.  Note that the single
  956. quote has one tick, representing the "first" part of the line, while
  957. the double quote has two ticks, representing the "second" part of the
  958. line. 
  959.  
  960.  
  961. , - beginning of line (comma) {<Esc>,}
  962.  
  963.      The ',' command will move the cursor to the beginning of the
  964. current line. 
  965.  
  966.  
  967. . - end of line (period) {<Esc>.}
  968.  
  969.      The '.' command will move the cursor to the end of the current
  970. line. 
  971.  
  972.  
  973. * - Insert last pattern found {<Esc>*}
  974.  
  975.      The last pattern found with the find command (up to 100
  976. characters) is saved in an internal buffer.  The '*' command will
  977. insert that pattern into the text at the current cursor location.  If
  978. the last find pattern included wild card characters, the pattern saved
  979. will be the actual text matched, and not the wild cards themselves.
  980. You must be back in command mode to use this command. 
  981.  
  982.  
  983.  
  984.  
  985.  
  986.  
  987.  
  988.                                  -15-                                 
  989.  
  990.  
  991.  
  992.  
  993. TVX Reference Manual                                            3/8/87
  994.  
  995.  
  996. nTAB, n{ - Skip over words {<Esc>^I, <Esc>{}
  997.  
  998.      The 'TAB' (TAB key, CTRL-I) and '{' commands skip over words.  A
  999. word is any contiguous set of alphabetic characters (a-z) or digits
  1000. (0-9).  'TAB' moves forwards, while '{' moves backwards.  The 'n'
  1001. count may be used to skip over several words at once, and a negative
  1002. count reverses the direction of the move.  A value of 0 for n will
  1003. move the cursor to the beginning of the current word rather than the
  1004. previous word as -{ would.  Note that '{' is usually aliased to '['
  1005. since these are often reversed case on different terminals. 
  1006.  
  1007.  
  1008. n< - begin repeat loop {<Esc><}
  1009.  
  1010.      TVX has up to 9 different repeat loop buffers which allow an
  1011. arbitrary sequence of commands to be repeatedly executed.  When n< is
  1012. typed, the editor echoes 'Repeat: n<' at the bottom of the screen.
  1013. The user then types in any series of commands to be repeated n times.
  1014. The repeat command is terminated with a matching '>' and a double
  1015. escape (echoed as $$).  Repeat loops may not be nested.  The repeat
  1016. loop has two typical useful functions: one is to replace multiple
  1017. occurrences of a string with another (e.g., "10<fone$=two$>$$"), a
  1018. second is to save a complicated sequence of commands to be repeated as
  1019. necessary with the '&' command (i.e., a macro facility).  Each repeat
  1020. loop may have up to 100 characters. 
  1021.      When a repeat loop is entered from the keyboard, it is saved in
  1022. one of up to 9 repeat loop buffers, each identified by an integer
  1023. value.  The repeat buffer which is currently in use can be set with
  1024. the 'n:R' command.  Buffer 1 will be used by default.  The number of
  1025. repeat buffers available and the currently active one can be
  1026. determined by using the 'M' command.  The availability of repeat
  1027. buffers allows the definition of 'edit macros'.  Commonly used
  1028. sequences of editor commands can be saved in a given repeat buffer,
  1029. then selected with 'n:R' and executed with the '&' command. 
  1030.      For example, "3:R<fpat1$>$$" would select repeat buffer 3 and
  1031. enter the repeat command into it (and execute the command once).
  1032. Other "macros" could be entered in other buffers, and then the given
  1033. example used again by "3:R&".  A count 'n' of 0 can be used to enter a
  1034. macro without executing it.  The indirect command file facility ('@'
  1035. command) can also be used to define and load commonly used macros.
  1036. The results of using one repeat buffer from within another is not
  1037. guaranteed, and should be tried only at your own risk. 
  1038.      The '#' command has been provided to simplify the above
  1039. sequence.  Entering '23#4' for example, is exactly the same as
  1040. entering '4:r23&'.  The n value is a count, and the single digit after
  1041. the '#' is the repeat buffer to use. 
  1042.  
  1043.  
  1044. >$$ - End of repeat loop {>$$}
  1045.  
  1046.      The repeat loop is terminated by a '>' and a double escape.
  1047. Note: '$$' represents escape. 
  1048.  
  1049.  
  1050.  
  1051.  
  1052.  
  1053.  
  1054.                                  -16-                                 
  1055.  
  1056.  
  1057.  
  1058.  
  1059. TVX Reference Manual                                            3/8/87
  1060.  
  1061.  
  1062. n& - execute repeat loop {<Esc>&}
  1063.  
  1064.      The '&' command executes the commands in the currently selected
  1065. repeat buffer n times. 
  1066.  
  1067.  
  1068. n#k - execute repeat loop k {<Esc>#}
  1069.  
  1070.      This command is an easy to execute a specified repeat buffer.
  1071. The n is a count and the k is a single digit repeat buffer number.
  1072. This command is exactly equivalent to 'k:rn&'.  Repeat buffer k
  1073. becomes the current buffer after '#' is executed. 
  1074.  
  1075.  
  1076. n~ - change case {<Esc>~}
  1077.  
  1078.      This command changes the case of the character under the cursor. 
  1079.  
  1080.  
  1081. ? - Help {<Esc>?}
  1082.  
  1083.      The '?' command causes help screens to be displayed.  There are
  1084. two help screens.  The first includes a summary of transitory values:
  1085. a summary of settable ':' parameters, the contents of the repeat and
  1086. find buffers, as well as buffer space left.  On 16 bit processors, if
  1087. the space left is greater than 32,000 characters, then 30,000+x will
  1088. be shown, where the total is 30,000 plus x. The first screen also
  1089. shows the last 16 commands you have entered.  This may be useful if
  1090. you entered "commands" while you thought you were in insert mode to
  1091. see what your keystrokes might have done.  The second screen of help
  1092. summarizes the command set. 
  1093.  
  1094.  
  1095. @ - Invoke command file {<Esc>@}
  1096.  
  1097.      Causes a prompt for command file name.  Commands in that file are
  1098. then read in and executed.  See description of backup command files
  1099. below for details.  This command is most useful for loading repeat
  1100. macros. 
  1101.  
  1102.  
  1103. n:P - Set special parameters {<Esc>:}
  1104.  
  1105.      The ':' (colon) command is used to set several TVX
  1106. characteristics.  The value n entered before the ':' is the value to
  1107. set the parameter to, and the character P that follows the ':' defines
  1108. the parameter to set.  Valid parameters include:
  1109.  
  1110. n:A - set autoindent.  A value of 1 turns on autoindent, 0 off.
  1111.    Autoindent is useful for programmers.  When autoindent is on, each
  1112.    new line started while in insert mode will be indented to the same
  1113.    leading tab/blank space as the previous line.  Use blanks or tabs
  1114.    to add indentation, and backspace to backup over indentation. 
  1115.  
  1116. n:C - set cut mode.  When cut mode is enabled (1), killed lines are
  1117.    also saved in the save buffer.  This works for individual kill
  1118.  
  1119.  
  1120.                                  -17-                                 
  1121.  
  1122.  
  1123.  
  1124.  
  1125. TVX Reference Manual                                            3/8/87
  1126.  
  1127.  
  1128.    commands, e.g.  'kkk' will save only the line associated with the
  1129.    3rd k, while '3k' will save 3 lines in the save buffer.  With cut
  1130.    mode off, kill line does not save the lines in the save buffer. 
  1131.  
  1132. n:D - set home "display" line to n. The display line is the line the
  1133.    cursor homes to after a verify command.  (Default home display
  1134.    line: 16 on 24 line terminals, 9 on 16 line terminals.)
  1135.  
  1136. n:E - Expand tab value.  The default value for ':E' is 8, which causes
  1137.    the tab character (^I) to be expanded to multiples of 8 columns.
  1138.    This is the standard used on most systems.  Setting ':E' to 0 will
  1139.    cause tabs to be displayed as '^I' instead.  Other values are
  1140.    possible, but less useful. 
  1141.  
  1142. n:F - Find case mode: n <= 0 sets find mode to search for exact case
  1143.    of pattern, n > 0 (default) set search mode to ignore upper/lower
  1144.    case. 
  1145.  
  1146. n:M - Match wild cards.  (default=1).  If on, then matching of the TVX
  1147.    wild card sets is enabled.  If off, then the wild card control
  1148.    characters will match the actual control characters in the file. 
  1149.  
  1150. :o - set output file name.  When ':o' is entered, you will be prompted
  1151.    for the name of the edited output file.  This overrides the '-o'
  1152.    command line switch, and can be used to change your mind about the
  1153.    name of the edited file.  If the output file name is different than
  1154.    the input file name, the input file will not be renamed to the
  1155.    backup file name. 
  1156.  
  1157. n:R - select repeat buffer n. (default=1).  Repeat buffer n becomes
  1158.    the current repeat buffer executed with the '&' command.  The 'm'
  1159.    status command will show how many repeat buffers are available for
  1160.    a given implementation. 
  1161.  
  1162. n:S - scroll lines: This parameter sets how many lines the cursor will
  1163.    move before the screen scrolls.  The exact effect of the scroll
  1164.    parameter depends on the terminal characteristics.  On terminals
  1165.    that allow a blank line to be inserted at the top, ':S' sets how
  1166.    many lines cursor will move above and below home display line
  1167.    before scrolling.  Default is 0. Changing the scroll value to 4
  1168.    would let the cursor move up and down 4 lines from the home display
  1169.    line before actually scrolling the screen.  Some users might find
  1170.    this update mode more pleasant to use.  This will be almost
  1171.    essential on heavily loaded time shared systems.  For terminals
  1172.    that do not allow a blank line to be inserted at the top (no
  1173.    reverse scroll), 'n:S' sets how many lines cursor will move above
  1174.    the home display line before the screen is rewritten.  Default is
  1175.    14, which causes the cursor to move nearly all the way to the top
  1176.    before rewriting the screen. 
  1177.  
  1178. :U - set User Wild Cards.  After entering :U, you will be prompted for
  1179.    a user wild card set.  You can use backspace to correct your entry,
  1180.    and '<Esc><Backspace>' to enter backspace and '<Esc><Esc>' to enter
  1181.    escape. 
  1182.  
  1183. n:V - virtual window lines.  The 'n:V' will set the virtual window to
  1184.  
  1185.  
  1186.                                  -18-                                 
  1187.  
  1188.  
  1189.  
  1190.  
  1191. TVX Reference Manual                                            3/8/87
  1192.  
  1193.  
  1194.    n lines.  N must be between 3 and the number of hardware lines on
  1195.    the terminal.  A smaller virtual window is extremely useful on busy
  1196.    time shared systems, or when TVX is used over a telephone line at a
  1197.    relatively slow baud rate.  Typically, a virtual window of 7 or 9
  1198.    is big enough to show a reasonable part of the file, yet small
  1199.    enough to reduce the overhead of screen update at slow speeds.  A
  1200.    window of 3 or 5 can even be used if needed.  Note that the virtual
  1201.    window can be set at start up time by using the '-#' switch.  The
  1202.    virtual window will use the top n physical lines of the display.
  1203.    Error messages and prompts will still be displayed on the bottom
  1204.    physical line.  Scanning up with 'u' will cause the lines to be
  1205.    scrolled onto the unused part of the screen, and gives a true
  1206.    picture of the file showing more lines than the window size. 
  1207.  
  1208. n:W - set auto wrap width.  The ':W' parameter sets the column number
  1209.    used for auto wrap mode.  When the auto wrap is set to a value
  1210.    greater that 1, TVX will automatically insert an end of line when
  1211.    the user types the first blank after the given column.  Normally,
  1212.    the user must manually hit the RETURN key to force an end of line.
  1213.    The auto wrap mode allows continuous entry of text without worrying
  1214.    about the right margin.  A good value to use for ':W' is 10 columns
  1215.    less than the screen width (70 on 80 columns screens). 
  1216.  
  1217. An invalid parameter value or name causes an error message. 
  1218.  
  1219.  
  1220.  
  1221.  
  1222.  
  1223.  
  1224.  
  1225.  
  1226.  
  1227.  
  1228.  
  1229.  
  1230.  
  1231.  
  1232.  
  1233.  
  1234.  
  1235.  
  1236.  
  1237.  
  1238.  
  1239.  
  1240.  
  1241.  
  1242.  
  1243.  
  1244.  
  1245.  
  1246.  
  1247.  
  1248.  
  1249.  
  1250.  
  1251.  
  1252.                                  -19-                                 
  1253.  
  1254.  
  1255.  
  1256.  
  1257. TVX Reference Manual                                            3/8/87
  1258.  
  1259.  
  1260.                    *** BACKUP LOG FILE FEATURE ***
  1261.  
  1262.      TVX has a backup log file feature.  When the feature is enabled,
  1263. all commands entered in any given session are saved on a file called
  1264. "BACKUP.LOG" on the current directory or drive.  If for some reason
  1265. you destroy your file during an editing session (like accidentally
  1266. entering "100^K" instead of "100K"), you won't have to manually
  1267. re-edit the backup version of the file.  (By default, the log file is
  1268. disabled.  The 'L' invocation time switch will respectively disable or
  1269. enable the log file feature.)
  1270.  
  1271.      The "BACKUP.LOG" file contains all the commands you entered in
  1272. the last session.  Most commands will appear in the log file as you
  1273. entered them: R, U, D, etc.  However, all control characters,
  1274. backspace, and the atsign are encoded in the log file to make them
  1275. appear as printable characters.  The atsign '@' is used as an encoding
  1276. character.  So, for example, tabs appear as '@I', escapes as '@[',
  1277. RETURNs as '@M', and so on.  Control-A would appear as '@A'.  The '@'
  1278. itself would appear as '@@'.  Backspace appears as '@H'.  These escape
  1279. sequences may be split across the end of a line in the log file.  The
  1280. end of line marks in the log file are not part of the command stream
  1281. and are ignored. 
  1282.  
  1283.      The procedure for using the "BACKUP.LOG" file to restore your
  1284. file is as follows.  When you realize you have made a mistake, enter
  1285. the '^X' exit command.  Copy "BACKUP.LOG" to a temporary working
  1286. file.  Now edit that temporary version of the log file to remove the
  1287. mistakes, which should be near the end of the file. 
  1288.  
  1289.      Once the log file has been edited to remove the bad commands, you
  1290. should then re-edit the original file (the one without the mistakes).
  1291. The latest version of the file will be the one with the mistakes, and
  1292. should usually be killed.  Start TVX and read in the file.  Then enter
  1293. the '@' command and supply the name of the "repaired" log file.  All
  1294. the commands in that log file will be applied to the original file.
  1295. You should be careful to start the '@' command when the cursor is at a
  1296. specific place such as the beginning of the file.  After the '@'
  1297. command is finished, your file will be in the same shape it was before
  1298. the mistake. 
  1299.  
  1300.      For example, suppose you are editing a file called "MYFILE0.TXT"
  1301. and that you accidentally kill 100 lines.  When you realize your
  1302. mistake, you enter '^X' to exit.  Then you should copy or rename the
  1303. BACKUP.LOG file to a new temporary file - say FIX.LOG.  The current
  1304. version of the file you were editing is the bad file and should be
  1305. deleted.  On CP/M and MS-DOS versions, you would rename MYFILE0.BAK to
  1306. be MYFILE0.TXT again.  Then, edit FIX.LOG to remove the command that
  1307. killed 100 lines and the quit command ("100@K@X").  Exit again, and
  1308. re-edit MYFILE0.TXT.  If you then enter the '@' command, and respond
  1309. with FIX.LOG as the name of the command file, your file will be
  1310. brought back to the state it was in right before the '100^K'. 
  1311.  
  1312.      There are some special cases that require special attention when
  1313. using the backup log file.  These cases involve the entry of file
  1314. names or strings, such as for '^Y', ':o', and ':u'.  For 'Y', the file
  1315. read as a part of the given command is read using the same I/O channel
  1316.  
  1317.  
  1318.                                  -20-                                 
  1319.  
  1320.  
  1321.  
  1322.  
  1323. TVX Reference Manual                                            3/8/87
  1324.  
  1325.  
  1326. as the backup log file input, and thus both cannot be used at the same
  1327. time.  If the backup log file contains any '^Y' commands (displayed in
  1328. the log file as '@Y'), you must remove them.  Obviously, this will
  1329. alter the order of the commands in the file, and you will need to use
  1330. a special procedure.  Suppose, for example, that the backup log file
  1331. contained one '^Y' command.  Make two copies of the backup log file.
  1332. Edit the first, and remove all commands following the '^Y' command,
  1333. including the '^Y' command.  Then edit the other copy, and remove all
  1334. commands before the '^Y', including the '^Y'.  Then, edit the backup
  1335. copy of the original file.  First, apply the first backup log file.
  1336. This will get you to the point right before the '^Y'.  Then without
  1337. changing the cursor position, manually enter the '^Y' command and file
  1338. name.  Finally, apply the second copy of the backup log file. 
  1339.  
  1340.      For ':o' and ':u', the filename or user set are not save as part
  1341. of the log file, and you will in fact be prompted for the file name or
  1342. user set while the log file is being executed.  There is no real clean
  1343. way around this. 
  1344.  
  1345.      It is also possible to write log command files of your own to
  1346. carry out specific commands.  This allows the creation of "macros"
  1347. that can be executed as needed.  When creating log files of your own,
  1348. you should remember that control characters and backspaces must appear
  1349. as encoded characters.  The '@' is the encoding character.  Control
  1350. characters will appear as '@' followed by the appropriate letter: '^I'
  1351. = '@I', enter = '@M', etc.  An '@' itself is '@@', and backspace is
  1352. '@H', although you should never need a backspace in your own files
  1353. (use -K). 
  1354.  
  1355.  
  1356.  
  1357.  
  1358.  
  1359.  
  1360.  
  1361.  
  1362.  
  1363.  
  1364.  
  1365.  
  1366.  
  1367.  
  1368.  
  1369.  
  1370.  
  1371.  
  1372.  
  1373.  
  1374.  
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.  
  1381.  
  1382.  
  1383.  
  1384.                                  -21-                                 
  1385.  
  1386.  
  1387.  
  1388.  
  1389. TVX Reference Manual                                            3/8/87
  1390.  
  1391.  
  1392.                         *** Error Messages ***
  1393.  
  1394. *** Abort, are you sure? 
  1395.      This message is displayed after the "abort" command has been
  1396. entered.  A reply of y or Y will cause the session to be terminated. 
  1397.  
  1398. *** Bad O= switch
  1399.      An incorrect format was specified for the O= switch. 
  1400.  
  1401. *** Bad @ name
  1402.      An invalid file name was specified.  Re-enter. 
  1403.  
  1404. *** Bad command: x
  1405.      The command is not a valid TVX command. 
  1406.  
  1407. *** Bad file name
  1408.      An invalid file name was specified.  Re-enter. 
  1409.  
  1410. *** Bad output file: filename
  1411.      An invalid output file was specified. 
  1412.  
  1413. *** Bad par (val | name)
  1414.      An invalid value or parameter name was specified. 
  1415.  
  1416. *** Bad rpt buff #
  1417.      An invalid repeat loop number was entered. 
  1418.  
  1419. *** Bad switch
  1420.      An invalid switch was specified.  Re-enter file name and
  1421. switches. 
  1422.  
  1423. *** buffer empty
  1424.      Information message.  Displayed after a new file has been
  1425. created, or when the write buffer command is executed and the text
  1426. buffer is empty. 
  1427.  
  1428. *** Can't create new name
  1429.      TVX was unable to create a new name for the output file.  Free
  1430. some disk space, rename the file, try again. 
  1431.  
  1432. *** Can't insert that
  1433.      There are three values that TVX uses internally, and thus are not
  1434. valid as user inserted characters in the text buffer. 
  1435.  
  1436. *** Can't save last line twice! 
  1437.      The last line of the buffer can only be saved once.  (That
  1438. applies to the other lines, too, but the last line is a special case.)
  1439.  
  1440. *** Can't :o, R/O
  1441.      It makes no sense to set a new file name when the file is read
  1442. only. 
  1443.  
  1444. *** Can't, buffer empty.  Insert 1st
  1445.      Most TVX commands are not valid until some text has been inserted
  1446. into the buffer. 
  1447.  
  1448.  
  1449.  
  1450.                                  -22-                                 
  1451.  
  1452.  
  1453.  
  1454.  
  1455. TVX Reference Manual                                            3/8/87
  1456.  
  1457.  
  1458. *** Can't: R/O
  1459.      File beginning is illegal when the file is read only. 
  1460.  
  1461. *** Compacting buffer
  1462.      Information message.  Displayed when TVX is compacting the
  1463. buffer.  The compaction process may take several seconds. 
  1464.  
  1465. *** Compacting done
  1466.      Information.  The compaction is complete. 
  1467.  
  1468. *** Compactor lost: quit now! 
  1469.      An internal error has been discovered.  Exit TVX immediately, and
  1470. preserve the backup copy.  Try the session again. 
  1471.  
  1472. *** Create?  (y/n)
  1473.      The file name specified does not exist.  A y answer will cause
  1474. the file to be created.  A n answer will allow the file name to be
  1475. respecified. 
  1476.  
  1477. *** Error reopening
  1478.      Something has gone wrong with the 'File beginning' command.
  1479. Exit, and try editing the file again.  Be careful since an empty file
  1480. may have been created. 
  1481.  
  1482. *** File only part read
  1483.      There was not enough room in the save buffer to hold the entire
  1484. external file specified in the 'merge' command.  Try re-editing using
  1485. the 's' big buffer switch. 
  1486.  
  1487. *** Line no longer there
  1488.      Return to noted location can't work because the noted line has
  1489. been deleted. 
  1490.  
  1491. *** lines filled
  1492.      TVX has run out of room to add more lines.  Use the 'write
  1493. buffer' or 'file beginning' command to get more space for new lines. 
  1494.  
  1495. *** no get room
  1496.      There is not enough room in the text buffer to insert all the
  1497. text in the save buffer.  Use the 'file begin' or 'write buffer'
  1498. commands, and try again.  The '-^W' command is often useful. 
  1499.  
  1500. *** no more lines for insert
  1501.      See "lines filled". 
  1502.  
  1503. *** no nesting
  1504.      TVX does not allow nested repeat loops: "<<..>>". 
  1505.  
  1506. *** no save room
  1507.      There is not enough room left to save any more text in the save
  1508. buffer.  Try saving smaller blocks, or use the 'file begin' command to
  1509. get more space. 
  1510.  
  1511. *** No more free lines for insert
  1512.      The maximum number of lines have been used.  Write the buffer
  1513. before inserting more new lines. 
  1514.  
  1515.  
  1516.                                  -23-                                 
  1517.  
  1518.  
  1519.  
  1520.  
  1521. TVX Reference Manual                                            3/8/87
  1522.  
  1523.  
  1524. *** not found
  1525.      The current find pattern was not found. 
  1526.  
  1527. *** Not a valid rpt buff
  1528.      The current line does not contain a valid repeat loop for the ^R
  1529. restore command to use. 
  1530.  
  1531. *** reading file... 
  1532.      Displayed while TVX is reading in the file. 
  1533.  
  1534. *** rename fails
  1535.      Something has gone wrong with the 'File beginning' or 'quit'
  1536. commands.  On timeshared systems, this may mean you didn't have write
  1537. capability for the file.  The work file will probably be retained, and
  1538. can be manually renamed or copied using standard operating system
  1539. commands. 
  1540.  
  1541. *** search fails
  1542.      A cross-buffer search has failed to find pattern. 
  1543.  
  1544. *** Save buffer empty! 
  1545.      Tried to write to a file when save buffer empty. 
  1546.  
  1547. *** Unable to open external file
  1548.      An invalid name was specified. 
  1549.  
  1550. *** Unable to open yank file
  1551.      An invalid name was specified. 
  1552.  
  1553. *** writing buffer
  1554.      Displayed when the buffer is being written out. 
  1555.  
  1556. *** writing partial buffer
  1557.      Partial buffer only, as caused by the '-^W' command. 
  1558.  
  1559. *** Yank filename:
  1560.      Enter the name of the file you want to read into the save
  1561. buffer. 
  1562.  
  1563. *** 100 chars only
  1564.      At most, 100 characters are allowed in each find pattern and each
  1565. repeat loop. 
  1566.  
  1567. *** <> not complete
  1568.      The repeat loop has terminated before the specified number times
  1569. have been executed.  This is usually what you wanted, and can be
  1570. caused by failing to find a pattern, or reaching the end of the
  1571. buffer.  An invalid command or other error will also cause a repeat
  1572. loop to terminate. 
  1573.  
  1574.  
  1575.  
  1576.  
  1577.  
  1578.  
  1579.  
  1580.  
  1581.  
  1582.                                  -24-                                 
  1583.  
  1584.  
  1585.  
  1586.  
  1587. TVX Reference Manual                                            3/8/87
  1588.  
  1589.  
  1590.                      *** INSTALLATION OF TVX ***
  1591.  
  1592.      If you have the C source code of TVX, this section has some notes
  1593. you should find useful if you recompile the code to customize TVX for
  1594. your system.  It should also be helpful if you are installing TVX on a
  1595. new system.  If you are just a user, then you can ignore this
  1596. section. 
  1597.  
  1598.  
  1599. *** General Comments ***
  1600.  
  1601.      TVX has been designed to be portable.  It has had versions
  1602. running under CP/M-80, MS-DOS, GEMDOS, RT-11, RSX-11, VMS, and Unix
  1603. BSD 4.2.  The heart of TVX portability is the terminal driver.  For
  1604. dedicated systems, the control codes used by a specific terminal are
  1605. hard wired into C global variables and a terminal specific version is
  1606. compiled.  It has been customary to give a unique name to each
  1607. different version such as TVV for a VT-52 version, TVT for a televideo
  1608. version, etc.  The Unix 4.2 BSD version of TVX has been written to
  1609. take advantage of the TERMCAP library usually provided, and is thus
  1610. terminal independent. 
  1611.  
  1612.      Since terminals differ widely, TVX tries to update the screen as
  1613. best as possible using the control codes available.  The minimum set
  1614. of control sequences required by TVX include direct x-y cursor
  1615. positioning, and erase from cursor to the end of the current line.
  1616. Almost all terminals have at least these two controls.  The only known
  1617. terminal widely available that does not have both of these is the
  1618. ADM-3a.  Thus, TVX will NOT work on ADM-3a's.  Another desirable
  1619. control sequence is the ability to insert a blank line at the top of
  1620. the screen (reverse scroll).  This allows TVX to scroll rather than
  1621. jump from one screen to the next.  However, TVX will perform
  1622. adequately even on terminals with only x-y and erase to end of line.
  1623. It has also been found that TVX does not always work on terminals with
  1624. multiple pages of screen data.  The scroll bottom line command usually
  1625. fails. 
  1626.  
  1627. *** Quick and Dirty Porting ***
  1628.  
  1629.      It should be very simple to port TVX to a new machine for a
  1630. specific terminal.  The only "hard" part comes when trying to use a
  1631. package like TERMCAP.  Then, the 4.2 Unix code can serve as a guide.
  1632. In effect, what that code does is get the screen controls and patch
  1633. the regular TVX screen control locations. 
  1634.  
  1635.      Typically, however, it should be almost trivial (assuming a
  1636. fairly standard C implementation - the current code compiles unchanged
  1637. on 4 different C compilers) to generate a version of TVX for a
  1638. specific terminal.  The main steps:
  1639.  
  1640.      1. Define the control codes for the terminal.  These are
  1641. explained in some detail in the manual. 
  1642.  
  1643.      2. Fix file I/O calls.  This may take no changes at all.  The
  1644. main issue has been the mode argument to fopen.  TVX likes to get the
  1645. file raw - with NO end of line handling by the C I/O system.  These
  1646.  
  1647.  
  1648.                                  -25-                                 
  1649.  
  1650.  
  1651.  
  1652.  
  1653. TVX Reference Manual                                            3/8/87
  1654.  
  1655.  
  1656. things are identified by #define's in tvx_defs.ic.  The other issue is
  1657. what is the end of line character.  Unix likes LF only, while MS-DOS
  1658. and descendants like CR/LF (actually DEC RT-11 descendants).  The
  1659. #define FILELF and NEWLINE handle this. 
  1660.  
  1661.      3. The last issue is getting characters to and from the
  1662. terminal.  These are isolated in tvx_io.c.  The critical routines:
  1663.  
  1664.      ttrd() [ and ttrd_() ]: This reads one character (ANY possible
  1665. character, except possible ^S and ^Q) from the terminal, UNECHOED.
  1666. The routine ttinit is called to possibly initialize things, and ttclos
  1667. at the end to undo whatever ttinit did. 
  1668.  
  1669.      ttwt() and ttwtln(): These are used to send characters to the
  1670. screen.  ttwt sends a single character, immediately and unbuffered.
  1671. ttwtln can be based on ttwt, but is provided and used whenever a chunk
  1672. is available to write.  This is essential on busy time shared
  1673. systems. 
  1674.  
  1675.      That's really the only problem areas.  One good thing to do when
  1676. porting is to find all the uses of #ifdef (and #ifndef) for the
  1677. implementations described: MSDOS, UNIX, GEMDOS.  Those certainly
  1678. identify the areas most likely to be different on your system. 
  1679.  
  1680.  
  1681. *** Source Files Supplied ***
  1682.  
  1683.      The following files are included in most distributions:
  1684.  
  1685.   TVX_1.C  - main part of code (part 1)
  1686.   TVX_2.C  - main part of code (part 2)
  1687.              These two files are mostly os and terminal independent.
  1688.   TVX_EDIT.C - The main heart of the command parser.  Isolated to
  1689.                make generating new emulators easy.  When generating
  1690.                a new emulator, only TVX_EDIT and TVX_LEX need to
  1691.                be recompiled.
  1692.   TVX_LEX.C - defaults, some os dependent stuff in here.  Major
  1693.             changes in defaults can be fixed by recompiling this file.
  1694.   TVX_IO.C - almost all I/O, including screen, confined to this file.
  1695.   TVX_LIB.C - misc library routines needed by TVX.
  1696.   TVX_IBM.C - IBM-PC specific code, specifically the screen driver
  1697.               (TVX_IBM.ASM - hand optimized version of TVX_IBM.C)
  1698.   TVX_UNIX.C - contains unix specific code, including termcap driver
  1699.   TVX_DEFS.IC - #define's for version, os, terminal, defaults
  1700.   TVX_GLBL.IC - global data structures
  1701.   TVX_TERM.IC - definitions for various terminals and systems
  1702.  
  1703.   TVX_MAKE.BAT - MS-DOS Batch file to build TVX using Microsoft C Vers 4.0.
  1704.   TVX_MAKE.UNX - Unix Makefile to make on unix.
  1705.  
  1706.   TVX_REF.DOC - This file, preformatted for printing on a "standard"
  1707.                 printer - 80 columns by 66 lines.
  1708.   TVX_TUT.DOC - A novice user tutorial for using Standard TVX.
  1709.   xxx.ref -    a quick reference card for given version of TVX.
  1710.  
  1711.  
  1712.  
  1713.  
  1714.                                  -26-                                 
  1715.  
  1716.  
  1717.  
  1718.  
  1719. TVX Reference Manual                                            3/8/87
  1720.  
  1721.  
  1722. *** Screen Driver and Control Sequences ***
  1723.  
  1724.      The actual codes used by TVX to update the screen are global
  1725. variables in the 'tvx_glbl.ic' file.  Using the '#ifdef EXTERN' trick
  1726. described in that file, the screen variables (plus most other relevant
  1727. global variables) are included as external references.  The actual
  1728. definitions for a given terminal are included in a file called
  1729. 'tvx_term.ic'.  Several sample definitions are included in the
  1730. distribution code.  A description of each relevant variable follows:
  1731.  
  1732.  
  1733. ** X-Y Cursor Addressing
  1734.  
  1735. int addx - amount to add to internal x position get terminal's x
  1736. value.  Terminals typically encode x-y as a single printable
  1737. character, thus requiring the addition of a blank to make x-y
  1738. printable.  Since TVX uses a 1,1 origin, this value will commonly be
  1739. 31. 
  1740.  
  1741. int addy - same as addx, but for y position. 
  1742.  
  1743. char cxychr - true (1) if convert xy binary representation to ascii
  1744. string. 
  1745.  
  1746. char cxy1st - 'l' if line coordinate first, 'c' if column first. 
  1747.  
  1748. char cxybeg[8], char cxymid[8], char cxyend[8] - The x-y cursor
  1749. control sequence usually takes one of two forms: <control><x><y> or
  1750. <control><x><middle><y><end>.  The x and y may be reversed.  These
  1751. three arrays are used to send the proper control sequence for xy
  1752. positioning. 
  1753.  
  1754.  
  1755. *** Other control sequences
  1756.  
  1757. char cversn[12] - a version string to identify terminal. 
  1758.  
  1759. char cerrbg[8], char cerred[8] - sequences sent when an error message
  1760. sent to terminal's last line.  Note that cerrbe is sent BEFORE the
  1761. cursor is moved to the last line, and cerred is sent before the cursor
  1762. is returned to the original position.  Some terminals give problems if
  1763. a highlight sequence is sent before a cursor positioning sequence.  A
  1764. bell is usually safe for most versions. 
  1765.  
  1766. char ctopb[8] - This sequence should insert a blank line when the
  1767. cursor is at the top left corner.  It is often called reverse line
  1768. feed.  A command to insert a line usually performs the same function,
  1769. but some terminals don't have both. 
  1770.  
  1771. char cinit[20], char cendit[20] - these sequences are sent to
  1772. initialize and reset the terminal. 
  1773.  
  1774. char cbotb[8] - this sequence scrolls the screen up one line when the
  1775. cursor is on the last line.  Line feed works for any terminal
  1776. encountered to date. 
  1777.  
  1778.  
  1779.  
  1780.                                  -27-                                 
  1781.  
  1782.  
  1783.  
  1784.  
  1785. TVX Reference Manual                                            3/8/87
  1786.  
  1787.  
  1788. char celin[8] - Erase from cursor to end of line.  This sequence is
  1789. required for operation of TVX. 
  1790.  
  1791. char cescr[8] - Erase from cursor to end of screen.  If the terminal
  1792. doesn't have this, it is simulated using multiple celins. 
  1793.  
  1794. char ccsrcm[8], char ccsrin[8] - These are used to change the cursor
  1795. from command mode to insert mode.  Many terminals do not support a
  1796. method of changing the cursor shape.  These have been also been used
  1797. to change the screen from normal to reverse video and back. 
  1798.  
  1799. char ciline[8] - Insert a blank line.  A blank line is inserted on the
  1800. line the cursor is on.  If available, it can be used for ctopb, too. 
  1801.  
  1802. char ckline[8] - Kill a line.  The line the cursor is on is deleted,
  1803. and the following text scrolled up. 
  1804.  
  1805. char cundlb[8], cundle[8] - TVX has the capability to optionally
  1806. support bold and underline for some text processors.  For example, a
  1807. ^U can be used to toggle underscore.  This is only useful for a text
  1808. formatter that can recognize such a sequence. 
  1809.  
  1810. char cboldb[8], char cbolde[8] - Similar to undlb, but boldface. 
  1811.  
  1812.  
  1813. *** Default settings
  1814.  
  1815. int ddline - default display line.  This sets which line is the
  1816. default home display line.  For scrolling versions (dscrl != 0), right
  1817. in the middle is a good place.  For fixed cursor line versions,
  1818. something below the middle seems better (like 16 for 24 line
  1819. screens). 
  1820.  
  1821. int dscrl - default scroll lines.  If this is non-zero, the cursor
  1822. will move up and down lines on the screen with cursor movement
  1823. commands.  This requires a bit less screen update overhead, and is
  1824. better for slower time shared systems.  If it is zero, the cursor will
  1825. remain fixed on ddline, and text will scroll on and off the screen as
  1826. needed.  Both these are resettable with the : command. 
  1827.  
  1828. int dxcase - default search case.  0 means find is case insensitive, 1
  1829. means find must match exact case. 
  1830.  
  1831. int usecz - MS-DOS versions only.  If 1, TVX will put a Control-Z end
  1832. of file mark in the file (this is CP/M compatible).  If 0, TVX uses
  1833. MS-DOS end of file conventions. 
  1834.  
  1835. int autoin - TRUE (1) if auto indent, FALSE (0) otherwise. 
  1836.  
  1837. int logdef - Create backup log file by default?  0->no, 1-> yes. 
  1838.  
  1839. char wildch - The character used as a wild card in finds. 
  1840.  
  1841. char delkey - the delete character key, usually backspace. 
  1842.  
  1843. int tvhardlines - number of physical lines on screen. 
  1844.  
  1845.  
  1846.                                  -28-                                 
  1847.  
  1848.  
  1849.  
  1850.  
  1851. TVX Reference Manual                                            3/8/87
  1852.  
  1853.  
  1854. int tvlins - number of lines on virtual screen.  Initially should be
  1855. same value as tvhardlines. 
  1856.  
  1857. int tvcols - number of columns on screen.  If the terminal wraps new
  1858. text to the next line rather than discarding characters after the last
  1859. column, then tvcols must be set to 1 less than the true width of the
  1860. terminal. 
  1861.  
  1862. int isibmpc - TRUE (1) if this version uses the custom IBM-PC screen
  1863. driver.  FALSE (0) if uses regular terminal output code. 
  1864.  
  1865. char synofr[20], char synoto[20] - These are used to map commands.
  1866. The synofr contains commands to be aliased to the corresponding
  1867. command in the synoto table.  For example, the '[' and '{' keys are
  1868. often reversed on some terminals.  Making '[' in synofr a synonym to
  1869. '{' in synoto will make the two commands the same. 
  1870.  
  1871. char funkey - If the terminal has function keys, they can be supported
  1872. by TVX by setting this variable to the first code sent by the function
  1873. key, usually ESCAPE.  TVX supports only two code sequences for
  1874. function keys. 
  1875.  
  1876. char funchar[50] - this is the second code sent by a function key. 
  1877.  
  1878. char funcmd[50] - this is the equivalent command a given function key
  1879. will be mapped to.  Similar to synofr and synoto. 
  1880.  
  1881.  
  1882. *** #define options
  1883.  
  1884.      The file 'tvx_defs.ic' has many #define statements that can be
  1885. used to customize TVX for particular installations.  Ideally, the
  1886. source for TVX should be maintained as one set, and differences
  1887. between versions handled by #defines.  Most #defines are explained in
  1888. the source code, but a few deserve a few extra comments, and are
  1889. summarized below. 
  1890.  
  1891. #define VERSION " - TVX (7/1/85) - " - This defines the version of
  1892. TVX.  Any time a modification is made, the VERSION define should be
  1893. updated. 
  1894.  
  1895. #define VB - whether or not to create backup log version or not.  This
  1896. does NOT imply the file "backup.log" will be used automatically (see
  1897. variable logdef), simply that the code is included. 
  1898.  
  1899. #define ULBD - If defined, TVX supports underline, bold in ^U, ^B
  1900. format. 
  1901.  
  1902. #define BACKUPNAME - This defines the name of the backup log file, if
  1903. used. 
  1904.  
  1905. #define BUFFLIMIT - This defines how much space is saved in the text
  1906. buffer when reading in a file.  This determines how much space is
  1907. reserved for saving text with the 'S' command, and how much is left
  1908. over for new inserts.  Smaller values allow more text from the file to
  1909. be read, larger values allow more text to be saved.  The '-s' switch
  1910.  
  1911.  
  1912.                                  -29-                                 
  1913.  
  1914.  
  1915.  
  1916.  
  1917. TVX Reference Manual                                            3/8/87
  1918.  
  1919.  
  1920. at runtime increases this value. 
  1921.  
  1922. #define FILEREAD, #define FILEWRITE - These define the string used for
  1923. file mode in the fopen() calls.  Unix and MS-DOS versions are not
  1924. typically exactly compatible, as most MS-DOS C's allow a different
  1925. mode to handle the CR/LF problem. 
  1926.  
  1927. #define FNAMESIZE - maximum length of file names. 
  1928.  
  1929. #define INT16 - If #defined, then the normal C int is 16 bits long.
  1930. This changes the way memory status is displayed. 
  1931.  
  1932. #define LINELIMIT - Like BUFFLIMIT, only number of lines. 
  1933.  
  1934. #define MAXBUFF - Defines maximum number of characters allocated to
  1935. text buffer.  Malloc() is used to get the space from the runtime
  1936. system.  It is possible less than MAXBUFF will be available.  The
  1937. maximum allowed for any given system must be less than the maximum
  1938. value represented by an unsigned int.  If MAXBUFF is very large, there
  1939. get to be a noticeable initialization delay. 
  1940.  
  1941. #define MAXLINE - This determines the maximum number of lines
  1942. allocated per buffer.  It is related to MAXBUFF. 
  1943.  
  1944. #define REPEATBUFS - defines how many repeat buffers are allocated.
  1945. If space is a problem, allocate fewer repeat buffers. 
  1946.  
  1947. #define USELF - This symbol should be defined if the terminal needs a
  1948. line feed character after each carriage return.  Almost always true. 
  1949.  
  1950. #define FILELF - This symbol is defined if text files use a CR/LF
  1951. combination.  It causes a NEWLINE/LF to be written to files. 
  1952.  
  1953. #define NEWLINE - This defines the actual character used as a new line
  1954. in files.  On CR/LF systems, it should be a CR (13).  On systems like
  1955. Unix with a single new line separator, it should be that character
  1956. (LF). 
  1957.  
  1958. #define USECTRLZ - defined if the code for handling a Control-Z and
  1959. end of file mark should be used. 
  1960.  
  1961. #define NEEDTVLIB - define this if the standard C library provided
  1962. doesn't have the routine in TVX_LIB. 
  1963.  
  1964. #define HELP - Define this if help should be supported.  The help
  1965. routine uses significant space, which can be saved if help isn't
  1966. compiled in. 
  1967.  
  1968. #define CONFIGFILE - define this if support for the '-c' switch is
  1969. desired. 
  1970.  
  1971.  
  1972.  
  1973. **** MS-DOS Notes ***
  1974.  
  1975.      TVX can be built as a generic MS-DOS version and as an IBM-PC
  1976.  
  1977.  
  1978.                                  -30-                                 
  1979.  
  1980.  
  1981.  
  1982.  
  1983. TVX Reference Manual                                            3/8/87
  1984.  
  1985.  
  1986. specific version.  The MS-DOS version uses the standard DOS character
  1987. output routines.  Thus, it could use the ANSI.SYS driver, but it would
  1988. run very slowly then.  The IBM-PC version has a custom screen driver
  1989. that calls the ROM BIOS directly, and is very fast.  Even more speed
  1990. can be had by optimizing the output assembly code (the sysint
  1991. overhead).  The definitions for and IBMPC included in "tvx_term.ic"
  1992. also define the keypad keys to work in a predictable manner. 
  1993.  
  1994.  
  1995.  
  1996. *** Unix Notes ***
  1997.  
  1998.      The usual Unix version will be the TERMCAP version.  That version
  1999. works very well, but is not in all cases optimal for a given
  2000. terminal.  It might be desirable to build a specific version for the
  2001. terminal you use most often.  Most notably, the TERMCAP version does
  2002. not know about cursor shapes or other control sequences to distinguish
  2003. command mode from insert mode.  Also, it sets tvcols to one less than
  2004. the true value to avoid wrapping problems.  The termcap version also
  2005. only sends a bell for the error message. 
  2006.  
  2007.  
  2008.  
  2009.  
  2010.  
  2011.  
  2012.  
  2013.  
  2014.  
  2015.  
  2016.  
  2017.  
  2018.  
  2019.  
  2020.  
  2021.  
  2022.  
  2023.  
  2024.  
  2025.  
  2026.  
  2027.  
  2028.  
  2029.  
  2030.  
  2031.  
  2032.  
  2033.  
  2034.  
  2035.  
  2036.  
  2037.  
  2038.  
  2039.  
  2040.  
  2041.  
  2042.  
  2043.  
  2044.                                  -31-                                 
  2045.  
  2046.  
  2047.  
  2048.  
  2049. TVX Reference Manual                                            3/8/87
  2050.  
  2051.  
  2052.                         *** TVX File Usage ***
  2053.  
  2054.      TVX uses four logical files: the original file, the destination
  2055. file, a work file, and the source file.  The original file and the
  2056. destination file are not touched until a normal exit from TVX. 
  2057.  
  2058.      The source file is the current copy of the file providing text to
  2059. be entered.  When TVX is first started, the source file and the
  2060. original file are the same.  The work file is used to hold the edited
  2061. output file. 
  2062.  
  2063.      When the '^B' file beginning command is issued, the remainder of
  2064. the source input file is written to the work output file.  The work
  2065. file then becomes the new source file, and a new work file is
  2066. created.  Thus, it is possible to have four copies of a file around:
  2067. The .BAK backup copy of the original file, the original copy of the
  2068. file, the copy of the source file, and the (partially written) work
  2069. file.  Under normal operation, there will only be two copies: the
  2070. source file (which is really the original file) and the possibly
  2071. partially written work file.  Only by using the '^B' commands can 3
  2072. copies of the file exist. 
  2073.  
  2074.      When you issue the normal '^X' exit command, the following
  2075. actions take place: Any old .BAK files are deleted.  The original file
  2076. is renamed to be the new .BAK version.  If the source file is
  2077. different than the original file, it will be deleted.  The work file
  2078. is then renamed to be the destination file.  If you don't have write
  2079. access to the directory with the original file, then the original file
  2080. and the work file will not be renamed.  A message to that effect will
  2081. be printed.  The normal operating system copy and rename commands can
  2082. be used to recover the work file, which contains the edits made to
  2083. date. 
  2084.  
  2085.  
  2086.  
  2087.  
  2088.  
  2089.  
  2090.  
  2091.  
  2092.  
  2093.  
  2094.  
  2095.  
  2096.  
  2097.  
  2098.  
  2099.  
  2100.  
  2101.  
  2102.  
  2103.  
  2104.  
  2105.  
  2106.  
  2107.  
  2108.  
  2109.  
  2110.                                  -32-                                 
  2111.  
  2112.  
  2113.  
  2114.  
  2115. TVX Reference Manual                                            3/8/87
  2116.  
  2117.  
  2118.                *** Standard Quick Reference Summary ***
  2119.  
  2120.  
  2121.        TVX Commands (n => count allowed)
  2122.  
  2123.     nA Append lines            B Buffer beginning
  2124.     ^B File beginning         nC Change chars
  2125.     nD Down line             n^D Down column
  2126.      E Buffer end            n^E Edit repeat buffer
  2127.     nF Find pattern           ^F Find across buffs
  2128.      G Get save buffer        ^G Unkill last line
  2129.     nH Half page              nI Insert (till $)
  2130.      J Jump back              nK Kill character
  2131.    n^K Kill line              nL Left
  2132.      M Memory status          nN Note location
  2133.    n^N Reset location         nO Open blank line
  2134.     ^O Operating system       nP Page
  2135.     ^P Print screen           nR Right
  2136.     ^R Restore edited buffer  nS Save lines
  2137.     nT Tidy (fill text)       ^T Abort session
  2138.     nU Up                    n^U Up column
  2139.      V Verify                n^W Write buff
  2140.     ^X Exit, end session     n^Y Yank to(-n)/from(+n) file
  2141.    nBS Delete prev. char.     n; Find again
  2142.      / Delete last thing       = Change last thing
  2143.      ' Del to line beginning   " Delete to line end
  2144.      , Line beginning          . Line end
  2145.   nTAB Word right             n{ Word left
  2146.   n<>$$ Repeat loop           n& Repeat again
  2147.    n#k Execute repeat buffer k n times
  2148.      ? Help                    @ Invoke cmd file
  2149.      * Insert pat found last  n~ Toggle case
  2150.      $ Escape - end insert, find, repeat
  2151.    n:p Set parameter p
  2152.  
  2153.   Possible parameters:
  2154.  
  2155.     A - Autoindent (1=y,0=n)       D - display line
  2156.     E - Expand tabs to n spaces    F - find case (0=exact,1=any)
  2157.     M - Match wild cards           O - set output file name
  2158.     S - scroll window              R - repeat buffer to use
  2159.     U - define user wild card set  V - virtual window
  2160.     W - autowrap width             C - cut mode
  2161.  
  2162.   Usage: tvx filename [-b -i -l -o=f -r -s -w -# -x=c {-z}]
  2163.  
  2164.     -[no]b : backup file           -[no]i : autoindent
  2165.     -[no]l : make command log file -x=commands : execute cmds
  2166.     -o=outputfile                  -r : read only
  2167.     -s : big save buff             -[no]w : word processing mode
  2168.     -# : set virtual window lines to #
  2169.  
  2170.   On MS-DOS versions:
  2171.     -[no]z : use control-z for end of file
  2172.  
  2173.  
  2174.  
  2175.  
  2176.                                  -33-                                 
  2177.  
  2178.  
  2179.  
  2180.  
  2181. TVX Reference Manual                                            3/8/87
  2182.  
  2183.  
  2184.                  VIX - A vi-like editor based on TVX
  2185.  
  2186.  
  2187.      Vix is an extension to tvx that provides a close emulation of the
  2188. Unix editor vi.  While the majority of the common commands are
  2189. identical, there are some inherent differences in the way tvx and vi
  2190. treat text.  Most of the commands were implemented directly using the
  2191. TVX equivalent, although some commands were required new code.  If the
  2192. vi command could not be implemented, its command letter was left
  2193. unused, and will produce an error message. 
  2194.  
  2195.      Vix does not have the underlying ex editor, so none of the escape
  2196. to ex commands work.  Vix does have the TVX repeat loop, however, and
  2197. this compensates to a great extent for the need for ex features.
  2198. Please consult the TVX manual for examples of using the repeat loop.
  2199. Note that when using the repeat loop with vix, the commands will be
  2200. vix commands and not tvx commands. 
  2201.  
  2202.      Another significant difference is that tvx (and thus vix) treats
  2203. the end of line character as just another character.  Thus cursor
  2204. movement commands move over the end of line in a fashion one would
  2205. expect.  However, when one moves to the end of the line, the cursor is
  2206. placed 'over' the newline (displayed after the last real character in
  2207. the line).  This makes the '$' command work somewhat differently.
  2208. This also means that you can include a <return> in a search pattern.
  2209. Vix and tvx use ESCAPE to end the search pattern instead of <return>. 
  2210.  
  2211.      Vi uses the ':' command to read and write the file (among other
  2212. things).  Vix uses the ':' to set operating parameters such as
  2213. autoindent, screen size, etc.  The 'ZZ' (or 'ZA' to abort without
  2214. changes) command is used by vix to exit. 
  2215.  
  2216.      Unlike vi and ex, tvx and vix try to load the entire file being
  2217. edited into memory (called the buffer by tvx/vix, as opposed to the
  2218. yank or save buffer).  If the entire file doesn't fit, the user must
  2219. manually 'page' the file in and out of memory manually.  Most of the
  2220. 'q' ("tvx" prefix) commands are supplied to handle buffer
  2221. manipulation.  For more details, consult the TVX manual.  TVX/vix also
  2222. uses the concept of the "last thing" as a major editing tool.
  2223. Whenever you find a pattern, skip over a word with b or w, save text
  2224. into the save buffer with the 'y' or 'Y' commands, or put text from
  2225. the save buffer, that text is considered the "last thing".  The 'c/'
  2226. and 'd/' commands will delete the last thing.  Entering a new command
  2227. will forget what the last thing was until you again enter a "last
  2228. thing" command. 
  2229.  
  2230.  
  2231.  
  2232.  
  2233.  
  2234.  
  2235.  
  2236.  
  2237.  
  2238.  
  2239.  
  2240.  
  2241.  
  2242.                                  -34-                                 
  2243.  
  2244.  
  2245.  
  2246.  
  2247. TVX Reference Manual                                            3/8/87
  2248.  
  2249.  
  2250.      The available vix commands are summarized below.  The first
  2251. column of each entry has a character noting similarities and
  2252. differences with the real vi commands in the following fashion:
  2253.  
  2254. - means present in vi, not implemented in vix.
  2255. = means commands work identically {with possible minor variations}
  2256. + means new or significantly different command
  2257. * means "equivalent" command, somewhat different than vi
  2258. <space> means command unused in both vi and vix.
  2259.  
  2260.   n in front of command means command takes count argument
  2261.   [synonyms indicated in brackets]
  2262.  
  2263.    ^@: Unused
  2264.    ^A: Unused
  2265. = n^B: Backward window. {2 lines of continuity not preserved}
  2266.    ^C: Unused
  2267. = n^D: Down half window.
  2268. -  ^E: Not implemented
  2269. = n^F: Forward window.
  2270. *  ^G: memory status, short info line
  2271. = n^H: backspace Command mode: left; Insert mode: del last char
  2272. =  ^I: inserts tab in insert mode, not a command.
  2273. = n^J: down arrow in column [j,^N]
  2274. + n^K: up in column [k,^P]
  2275. =  ^L: verify screen [^R,z]
  2276. = n^M: down to beginning of line [+]
  2277. = n^N: [j, ^J]
  2278.    ^O: Unused
  2279. = n^P: [k, ^K]
  2280. =  ^Q: Unused (flow control)
  2281. =  ^R: Redraw screen [^L,z]
  2282. =  ^S: Unused (flow control)
  2283. +  ^T: TVX prefix command - see q [q,Q,T]
  2284. * n^U: Up half window.  ** in insert mode, does NOT erase line **
  2285. *  ^V: Not a command.  NOT literal quote in insert mode.
  2286. *  ^W: Not a command.  NOT used for delete word in insert.
  2287.    ^X: Unused
  2288. -  ^Y: Not implemented
  2289. -  ^Z: Not implemented
  2290. =  Escape: forces command mode, safe follow char for d,c,q.
  2291.    ^: Unused
  2292. -  ^]: Not implemented
  2293. -  ^^: Not implemented
  2294.    ^_: Unused
  2295. =  <space>:  [r]
  2296. +  n!: Tidy.  Fills n lines up to wrap margin. [see autowrap]
  2297. -   ": Not implemented
  2298. + n#p: execute repeat loop number 'p' 'n' times
  2299. =   $: goto end of current line {end is newline, not last char}
  2300. -   %: Not implemented
  2301. -   &: Not implemented
  2302. -   ': Not implemented
  2303. -   (: Not implemented
  2304. -   ): Not implemented
  2305. +   *: insert last matched pattern into text buffer
  2306.  
  2307.  
  2308.                                  -35-                                 
  2309.  
  2310.  
  2311.  
  2312.  
  2313. TVX Reference Manual                                            3/8/87
  2314.  
  2315.  
  2316. =  n+: [CR, ^M]
  2317. -   ,: Not implemented
  2318. *   -: Used in vix for negative counts, use K for up line.
  2319. -   .: Not implemented, repeat loops are a substitute
  2320. =   /: search {Escape used to end pattern, multi-line patterns ok}
  2321. *   0: 0 is used for counts (especially for : parameters)
  2322. = 0-9: count value for numeric arguments {may be negative!}
  2323. -   :: Not implemented - use ZZ and ZA to exit
  2324. -   ;: Not implemented
  2325. +  n<: Begin repeat loop. Loop terminated with >$$. ($ = Esc)
  2326. +   =: Help screens
  2327. +   >: Used to terminate repeat loops.
  2328. =   ?: Reverse search {search begins on previous line}
  2329. +  n@: execute current repeat loop n times (shorthand for n#p)
  2330. =   A: append to end of line
  2331. *  nB: back a word {vix's concept of words is different than vi}
  2332. =   C: changes rest of line
  2333. =   D: delete rest of the line
  2334. -   E: Not implemented
  2335. -   F: Not implemented
  2336. =  nG: goes to line number n, or end of buffer if no n supplied
  2337. *   H: Beginning of buffer (first line in buffer)
  2338. =   I: inserts at beginning of line
  2339. =   J: join lines {not needed since vix treats newlines as chars}
  2340. +  nK: Up a line to beginning of line
  2341. *   L: bottom line of file
  2342. +  nM: return to marked location n (n from 1 to 9, see m)
  2343. =   N: like n, but in reverse direction
  2344. =  nO: open a line above current line. n opens n blank lines.
  2345. =   P: put save buffer above current line {save buffers not named}
  2346. +   T: tvx commands (see q) [^T,q,Q]
  2347. *   U: very limited undo!! It only restores the LAST line killed!
  2348.     V: Unused
  2349. *  nW: Moves forward n words [w] {vix's concept of words not same}
  2350. =  nX: delete n characters before cursor
  2351. +  nY: append n lines to save buffer (see y), does not change buffer
  2352. =+ Zx: exit from vix (ZZ: normal, writes file, ZA: abort, no changes)
  2353. -  [[: Not implemented
  2354.     : Unused
  2355. -  ]]: Not implemented
  2356. =   ^: beginning of line {1st char of line, NOT 1st non-white char}
  2357. +   _: invoke indirect command file
  2358. =   a: append text starting after cursor
  2359. *   b: back up a word [see B]
  2360. =   c: change c, <sp>, ^, $, or / (delete, enter insert mode)
  2361.     =   c - change line
  2362.     =   <sp> - change one character
  2363.     =   ^ - to beginning of line
  2364.     =   $ - to end of line
  2365.     -   w, b, and any others not mentioned not implemented
  2366.     +   / - the last thing found, yanked or put
  2367. =  nd: delete d, <sp>, ^, $, or /
  2368.     =   d - delete line
  2369.     =   <sp> - delete character
  2370.     =   ^ - to beginning of line
  2371.     =   $ - to end of line
  2372.  
  2373.  
  2374.                                  -36-                                 
  2375.  
  2376.  
  2377.  
  2378.  
  2379. TVX Reference Manual                                            3/8/87
  2380.  
  2381.  
  2382.     -   w, b, and any others not mentioned not implemented
  2383.     +   / - the last thing found, yanked or put
  2384. -   e: Not implemented
  2385. -   f: Not implemented
  2386.     g: Unused
  2387. =  nh: Move left n characters [BS,^H] {will move over lines, too}
  2388. =  ni: insert (if value n supplied, then that ascii code inserted)
  2389. =  nj: down lines, in column [^J,^N]
  2390. =  nk: Up lines, in column [^K,^P]
  2391. =  nl: right n characters [<space>] {moves over lines, too}
  2392. *  nm: mark cur. line as location n.  Use M to return to location.
  2393. =   n: find next (in same direction as last ? or /)
  2394. =  no: open n following lines
  2395. =   p: put save buffer after cur line
  2396. +   q: Prefix character for "tvx" extended commands
  2397.         !: call operating system
  2398.         b: goto real beginning of the file
  2399.         e: edit repeat buffer
  2400.         j: jump back to last location
  2401.         p: put external file from save buffer
  2402.         r: restore repeat buffer
  2403.         s: print screen
  2404.         w: read in next page of file
  2405.         y: yank external file to save buffer
  2406.         /: cross buffer search
  2407.       n:p: set parameter 'p' to value 'n', parameters are:
  2408.          a: autoindent (1 means on, 0 off for all "switch" pars)
  2409.          c: "cut" mode (means 'dd' saves line in yank buffer, too)
  2410.          e: expand tabs to n spaces (8 default)
  2411.          d: home display line (where cursor homes after verify)
  2412.          f: find case mode (0 is case insensitive, 1 exact match)
  2413.          m: match wildcards (1 use ^A, ^L, etc., 0 no wild cards)
  2414.          o: requests new name for output file
  2415.          s: scroll window, cursor moves s lines before scrolling
  2416.          u: requests entry of user wild card set
  2417.          v: virtual window size
  2418.          w: autowrap limit.
  2419. =   r: replace next char with next character entered
  2420. =  ns: substitute: delete n characters, enter insert mode
  2421. -   t: Not implemented
  2422. -   u: Not implemented (see U)
  2423.     v: Unused
  2424. *  nw: advance word (see W)
  2425. =  nx: delete n characters
  2426. *  ny: yank text to save buffer - will save n lines into save buffer
  2427.        (Only one save buffer, 1st y clears buffer, rest add until
  2428.         non y command entered. dd works in a similar fashion, but
  2429.         kills as it saves (if cut_mode enabled)).
  2430. =   z: refresh screen (^L,^R)
  2431. -   {: Not implemented
  2432. -   |: Not implemented
  2433. =  n~: Change case of next n characters
  2434. * nDEL: Same as X, delete previous character
  2435.  
  2436.  
  2437.  
  2438.  
  2439.  
  2440.                                  -37-                                 
  2441.  
  2442.  
  2443.  
  2444.  
  2445. TVX Reference Manual                                            3/8/87
  2446.  
  2447.  
  2448.                       EMAX - TVX emulating emacs
  2449.  
  2450.      Important differences: No windows, no marked region, no Q
  2451. registers, no word delete or case change, ^K interacts differently
  2452. with save buffer multiple keyboard macros (called repeat loops), much
  2453. different file and buffer manipulation. 
  2454.  
  2455.      Partial line ^K's (no argument or 0 argument) will save the
  2456. deleted text in the unkill buffer (^CU), but NOT the save/cut buffer.
  2457. If an argument is supplied, then the killed lines are save in the save
  2458. buffer. 
  2459.  
  2460.      TVX'x kill last thing concept is implemented as ^C^K. 
  2461.  
  2462.      Values can be supplied in two ways.  Any of the <esc> commands
  2463. may supply a count after the <esc>.  Thus, '<esc>10B' will back over
  2464. 10 words.  <esc> may also be used to specify the count for ctrl
  2465. commands: '<esc>10^N' goes down 10 lines.  The usual emacs '^U' also
  2466. works to supply arguments.  It works in the emacs multiples of 4, but
  2467. the Arg: count echoes differently.  When you press ^U, then the
  2468. message 'Arg: 4' will appear on the bottom.  If you press ^U again, it
  2469. will change to 'Arg: 16'.  However, if you enter any other numeric
  2470. value, the 'Arg' message disappears, and you get no additional
  2471. prompting of values. 
  2472.  
  2473.  
  2474.  <ctrl-A>    Move to start of line.
  2475. n<ctrl-B>    (Back) Move backward by characters.
  2476. n<ctrl-C>    (Command) TVX Command: execute commands provided
  2477.              by TVX base.  (These ^C commands have NO relation
  2478.              to ^C commands of large emacs implemetations!)
  2479.          ^A    Append line to save buffer
  2480.          ^B    Move to absolute beginning of file
  2481.          ^E    Edit repeat buffer
  2482.          ^F    Fill n lines to autowrap margin
  2483.          ^G    No op - exit ^C
  2484.          ^H    Half screen down
  2485.          ^J    Jump back to previous location
  2486.          ^K    Delete last thing
  2487.          ^N    Move to beginning of next line
  2488.          ^M    Mark location n
  2489.          ^P    Move to beginning of previous line
  2490.          ^R    Restore edited repeat buffer
  2491.          ^W    Write buffer, read next portion of file
  2492.           ;    Search forward again
  2493.           ~    Change case of next n characters
  2494.           G    Goto line number n
  2495.           H    Half page up
  2496.           I    Insert ascii char n if n supplied,
  2497.                  otherwise enter insert mode
  2498.           L    Print screen on printer (micros only)
  2499.           M    Return to marked location
  2500.           P    Put line into save buffer
  2501.           S    Search forward across file buffers
  2502.           U    Unkill last single line killed
  2503.           Vp   Set variable p (like TVX's : command)
  2504.  
  2505.  
  2506.                                  -38-                                 
  2507.  
  2508.  
  2509.  
  2510.  
  2511. TVX Reference Manual                                            3/8/87
  2512.  
  2513.  
  2514.           W    Write save buffer to external file
  2515.           Y    Yank external file into save buffer
  2516. n<ctrl-D>    (Delete) Delete next character.
  2517.  <ctrl-E>    (End) Move to end of line.
  2518. n<ctrl-F>    (Forward) Move forward by characters.
  2519. n<ctrl-H>    Backspace - delete n previous characters
  2520. n<ctrl-K>    (Kill) With no argument, kill from current position
  2521.              to end of line; if at the end, kill the newline.
  2522.              With argument 0, kill from beginning of line to
  2523.              current position. Otherwise, kill argument lines
  2524.              forward (if positive) or backward (if negative).
  2525.  <ctrl-L>    Redraw the screen.
  2526. n<ctrl-N>    (Next) Move to next line.
  2527. n<ctrl-O>    (Open) Open line above cursor.
  2528. n<ctrl-P>    (Previous) Move to previous line.
  2529.  <ctrl-R>    (Reverse) search backward.
  2530.  <ctrl-S>    (Search) search forward. { <Esc>S is a synonym }
  2531.  <ctrl-T>    (Transpose) Transpose characters.
  2532.  <ctrl-U>    Specify an argument, as described above.
  2533. n<ctrl-V>    Move forward by n pages.
  2534.  
  2535.  <ctrl-X><ctrl-C>  Abort edit session with no changes.
  2536.  <ctrl-X><ctrl-B>  Short buffer status line
  2537. n<ctrl-X>E   (Execute) Execute current repeat loop n times.
  2538.  
  2539.  <ctrl-Y>    (Yank) Yank save buffer to current location.
  2540.  <ctrl-Z>    Save current buffer to associated file and exit.
  2541. n<Del>       Delete the previous n characters. (^H is synonym)
  2542.  
  2543.  <esc>%      Invoke command file (TVX @ file)
  2544.  <esc>!      Call operating system
  2545. n<esc>#p     Execute repeat loop 'p' 'n' times.
  2546. n<esc>(      Repeat loop definition.  ')<esc><esc>' ends loop.
  2547.  <esc>-,0-9  Auto argument for other <esc> and CTRL commands.
  2548.  <esc><      Move to beginning of buffer.
  2549.  <esc>>      Move to end of buffer.
  2550.  <esc>?      Help and status screens
  2551. n<esc>B      (Back) Move backward by words.
  2552. n<esc>F      (Forward) Move forward by words.
  2553. n<esc>V      Move backward by pages.
  2554.  
  2555.  
  2556.  
  2557.  
  2558.  
  2559.  
  2560.  
  2561.  
  2562.  
  2563.  
  2564.  
  2565.  
  2566.  
  2567.  
  2568.  
  2569.  
  2570.  
  2571.  
  2572.                                  -39-                                 
  2573.  
  2574.  
  2575.  
  2576.  
  2577. TVX Reference Manual                                            3/8/87
  2578.  
  2579.  
  2580.                             *** INDEX ***
  2581.                          TVX Reference Manual
  2582.  
  2583. abort - 12
  2584. append - 6, 12
  2585. auto wrap - 19
  2586. autoindent - 17
  2587.  
  2588. backspace - 1, 2, 14, 20, 21
  2589. backup file - 4, 6, 13, 20
  2590. beginning of file - 6, 9
  2591. buffer - 2, 6, 7, 9, 10, 12, 13
  2592. buffer beginning - 6
  2593.  
  2594. change - 7
  2595. commands - 1, 6
  2596. cursor - 1
  2597. cursor character - 6
  2598. cut mode - 17
  2599.  
  2600. default source settings - 28
  2601. define options - 29
  2602. delete last thing - 14, 15
  2603. delete line front - 15
  2604. delete line tail - 15
  2605. delete previous character - 14
  2606. down - 7, 12
  2607. down in column - 7
  2608.  
  2609. end buffer - 7
  2610. end session - 13
  2611. Error Messages - 22
  2612. escape - 6, 8, 9, 20
  2613. exit - 13
  2614. external file - 14
  2615.  
  2616. find - 8, 9, 14, 18
  2617. find case - 18
  2618.  
  2619. get - 9
  2620. get killed line - 9
  2621.  
  2622. half page - 9
  2623. home display line - 18
  2624.  
  2625. insert - 9, 11
  2626. Insert find pattern - 15
  2627. Installation - 25
  2628. Installation - MS-DOS - 30
  2629. Installation - Unix - 31
  2630. invoke command file - 17
  2631.  
  2632. jump - 10
  2633.  
  2634. kill characters - 10
  2635. kill lines - 10
  2636.  
  2637.  
  2638.                                  -40-                                 
  2639.  
  2640.  
  2641.  
  2642.  
  2643. TVX Reference Manual                                            3/8/87
  2644.  
  2645.  
  2646. left - 10
  2647. line beginning - 15
  2648. line end - 15
  2649. log file - 4, 14, 17, 20
  2650.  
  2651. memory - 10
  2652. mode - 6, 7, 9, 11, 15
  2653.  
  2654. note - 10, 11
  2655.  
  2656. open line - 11
  2657. operating system - 11
  2658. other control sequences - 27
  2659. output file - 18
  2660.  
  2661. page - 9, 11
  2662. parameters - 17
  2663. print - 11
  2664.  
  2665. Quick Reference Summary - 33
  2666. quit - 7
  2667.  
  2668. repeat buffer - 12
  2669. repeat loop - 7, 16, 18
  2670. right - 11
  2671.  
  2672. save buffer - 6, 9, 12, 14
  2673. scroll lines - 18
  2674. search - 8
  2675. skip over words - 15
  2676. source code - 25
  2677. starting up - 4
  2678. status - 10
  2679. switches - 5
  2680.  
  2681. tab expansion - 18
  2682. terminate - 12
  2683. tidy - 12
  2684. TVX File Usage - 32
  2685.  
  2686. unkill - 9
  2687. up - 13
  2688. up in column - 13
  2689. user wild cards - 18
  2690.  
  2691. verify - 13
  2692. virtual window - 18
  2693.  
  2694. wild card - 8, 18
  2695. word - 15
  2696. write buffer - 13
  2697.  
  2698. X-Y Cursor Addressing - 27
  2699.  
  2700. yank external file - 14
  2701.  
  2702.  
  2703.  
  2704.                                  -41-                                 
  2705.  
  2706.  
  2707.  
  2708. ə